Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. <configuration>
  2. <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
  3. <file>../logs/CTRL_log.log</file>
  4. <!-- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">-->
  5. <!-- <fileNamePattern>../logs/CTRL_log.log.%i.log</fileNamePattern>-->
  6. <!-- <minIndex>1</minIndex>-->
  7. <!-- <maxIndex>3</maxIndex>-->
  8. <!-- </rollingPolicy>-->
  9. <!-- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">-->
  10. <!-- <fileNamePattern>-->
  11. <!-- ../logs/CTRL_log_%d{dd-MM-yyyy}.log-->
  12. <!-- </fileNamePattern>-->
  13. <!-- <maxHistory>10</maxHistory>-->
  14. <!-- <totalSizeCap>100MB</totalSizeCap>-->
  15. <!-- </rollingPolicy>-->
  16. <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
  17. <fileNamePattern>../logs/CTRL_log-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
  18. <maxHistory>20</maxHistory>
  19. <maxFileSize>10MB</maxFileSize>
  20. <totalSizeCap>200MB</totalSizeCap>
  21. </rollingPolicy>
  22. <append>true</append>
  23. <encoder>
  24. <pattern>
  25. %d{dd-MM-yyyy HH:mm:ss.SSS} %-5level--- [%thread] %logger{36}.%M : %msg%n
  26. </pattern>
  27. </encoder>
  28. </appender>
  29.  
  30.  
  31. <!-- PATTERNS -->
  32. <!-- %d - outputs the time which the log message occurred in formats that SimpleDateFormat allows.-->
  33. <!-- %thread - outputs the name of the thread that the log message occurred in.-->
  34. <!-- $-5level - outputs the logging level of the log message.-->
  35. <!-- %logger{36} - outputs the package + class name the log message occurred in. The number inside the brackets represents the maximum length of the package + class name. If the output is longer than the specified length it will take a substring of the first character of each individual package starting from the root package until the output is below the maximum length. The class name will never be reduced. A nice diagram of this can be found in the Conversion word docs.-->
  36. <!-- %M - outputs the name of the method that the log message occurred in (apparently this is quite slow to use and not recommended unless your not worried about performance or the method name is particularly important to you).-->
  37. <!-- %msg - outputs the actual log message.-->
  38. <!-- %n - line break-->
  39. <!-- %magenta() - sets the colour of the output contained in the brackets to magenta (other colours are available).-->
  40. <!-- highlight() - sets the colour of the output contained in the brackets to the depending on the logging level (for example ERROR = red).-->
  41.  
  42. <!--ELK-Stack syslogger-->
  43. <!-- <appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">-->
  44. <!-- <syslogHost>127.0.0.1</syslogHost>-->
  45. <!-- <port>25826</port>-->
  46. <!-- <facility>LOCAL1</facility>-->
  47. <!-- <suffixPattern>[%thread] %logger %msg</suffixPattern>-->
  48. <!-- </appender>-->
  49.  
  50. <!-- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">-->
  51. <!-- <encoder>-->
  52. <!-- <pattern>%-5relative %-5level %logger{35} - %msg%n</pattern>-->
  53. <!-- </encoder>-->
  54. <!-- </appender>-->
  55.  
  56. <logger name="org.springframework" level="INFO"/>
  57. <logger name="jdbc" level="DEBUG" />
  58. <logger name="jdbc.sqlonly" level="DEBUG" additivity="false">
  59. <appender-ref ref="FILE"/>
  60. </logger>
  61.  
  62. <root level="DEBUG">
  63. <!-- <appender-ref ref="STDOUT" /> &lt;!&ndash; Every log will apear on screen log &ndash;&gt;-->
  64. <appender-ref ref="FILE" /> <!-- Every log will apear on file -->
  65. </root>
  66. <include resource="org/springframework/boot/logging/logback/base.xml"/>
  67. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement