我的 Dropwizard(版本 1.3.8)应用程序将 HTTP 请求记录到文件中时遇到问题。我按照 Dropwizard 的文档配置 YAML 文件,我的config.yml
外观如下:
logging:\n level: INFO\n loggers:\n com.nikolas.master_thesis: DEBUG\n\n appenders:\n - type: file\n currentLogFilename: /home/nikola/Documents/DWApp-LOGs/DW-Bookshop_LOG.log\n threshold: ALL\n queueSize: 512\n archive: true\n archivedLogFilenamePattern: /home/nikola/Documents/DWApp-LOGs/DW-Bookshop_LOG-%d.log\n archivedFileCount: 5\n timeZone: UTC\n logFormat: "%-5p [%d{ISO8601,UTC}] %c: %m%n%rEx"\n # logFormat: "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-agent}i\\"" combined\n# logFormat: \xe2\x80\x9c%h %l %u %t \xe2\x80\x9c%r\xe2\x80\x9c %s %b \xe2\x80\x9c%{Referer}i\xe2\x80\x9c \xe2\x80\x9c%{User-Agent}i\xe2\x80\x9c\xe2\x80\x9c combined\n# logFormat: \'%h %l %u %t \'%r\' %\\\\>s %b \'%{Referer}i\' \'%{User-Agent}i\'\'\n# logFormat: "%d{HH:mm:ss.SSS} [%thread] …
Run Code Online (Sandbox Code Playgroud)