yolov5_log4j2.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Configuration>
  3. <Appenders>
  4. <RollingFile
  5. name="access_log"
  6. fileName="${env:LOG_LOCATION:-logs}/access_log.log"
  7. filePattern="${env:LOG_LOCATION:-logs}/access_log.%d{dd-MMM}.log.gz">
  8. <PatternLayout pattern="%d{ISO8601} - %m%n"/>
  9. <Policies>
  10. <SizeBasedTriggeringPolicy size="100 MB"/>
  11. <TimeBasedTriggeringPolicy/>
  12. </Policies>
  13. <DefaultRolloverStrategy max="5"/>
  14. </RollingFile>
  15. <Console name="STDOUT" target="SYSTEM_OUT">
  16. <PatternLayout pattern="%d{ISO8601} [%-5p] %t %c - %m%n"/>
  17. </Console>
  18. <RollingFile
  19. name="model_log"
  20. fileName="${env:LOG_LOCATION:-logs}/model_log.log"
  21. filePattern="${env:LOG_LOCATION:-logs}/model_log.%d{dd-MMM}.log.gz">
  22. <PatternLayout pattern="%d{ISO8601} [%-5p] %t %c - %m%n"/>
  23. <Policies>
  24. <SizeBasedTriggeringPolicy size="100 MB"/>
  25. <TimeBasedTriggeringPolicy/>
  26. </Policies>
  27. <DefaultRolloverStrategy max="5"/>
  28. </RollingFile>
  29. <RollingFile name="model_metrics"
  30. fileName="${env:METRICS_LOCATION:-logs}/model_metrics.log"
  31. filePattern="${env:METRICS_LOCATION:-logs}/model_metrics.%d{dd-MMM}.log.gz">
  32. <PatternLayout pattern="%d{ISO8601} - %m%n"/>
  33. <Policies>
  34. <SizeBasedTriggeringPolicy size="100 MB"/>
  35. <TimeBasedTriggeringPolicy/>
  36. </Policies>
  37. <DefaultRolloverStrategy max="5"/>
  38. </RollingFile>
  39. <RollingFile
  40. name="ts_log"
  41. fileName="${env:LOG_LOCATION:-logs}/ts_log.log"
  42. filePattern="${env:LOG_LOCATION:-logs}/ts_log.%d{dd-MMM}.log.gz">
  43. <PatternLayout pattern="%d{ISO8601} [%-5p] %t %c - %m%n"/>
  44. <Policies>
  45. <SizeBasedTriggeringPolicy size="100 MB"/>
  46. <TimeBasedTriggeringPolicy/>
  47. </Policies>
  48. <DefaultRolloverStrategy max="5"/>
  49. </RollingFile>
  50. <RollingFile
  51. name="ts_metrics"
  52. fileName="${env:METRICS_LOCATION:-logs}/ts_metrics.log"
  53. filePattern="${env:METRICS_LOCATION:-logs}/ts_metrics.%d{dd-MMM}.log.gz">
  54. <PatternLayout pattern="%d{ISO8601} - %m%n"/>
  55. <Policies>
  56. <SizeBasedTriggeringPolicy size="100 MB"/>
  57. <TimeBasedTriggeringPolicy/>
  58. </Policies>
  59. <DefaultRolloverStrategy max="5"/>
  60. </RollingFile>
  61. </Appenders>
  62. <Loggers>
  63. <Logger name="ACCESS_LOG" level="info">
  64. <AppenderRef ref="access_log"/>
  65. </Logger>
  66. <Logger name="io.netty" level="error" />
  67. <Logger name="MODEL_LOG" level="all">
  68. <AppenderRef ref="model_log"/>
  69. </Logger>
  70. <Logger name="MODEL_METRICS" level="all">
  71. <AppenderRef ref="model_metrics"/>
  72. </Logger>
  73. <Logger name="org.apache" level="off" />
  74. <Logger name="org.pytorch.serve" level="debug">
  75. <AppenderRef ref="ts_log"/>
  76. </Logger>
  77. <Logger name="TS_METRICS" level="all">
  78. <AppenderRef ref="ts_metrics"/>
  79. </Logger>
  80. <Root level="info">
  81. <AppenderRef ref="STDOUT"/>
  82. <AppenderRef ref="ts_log"/>
  83. </Root>
  84. </Loggers>
  85. </Configuration>