Created
November 7, 2019 12:34
-
-
Save tmcneill-reifyhealth/63f424cf901478a2a9d708147bbc11d1 to your computer and use it in GitHub Desktop.
add this to `config/logback.xml` and add `config` to `project.clj` resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> | |
<!-- Scanning is currently turned on; This will impact performance! --> | |
<configuration scan="true" scanPeriod="10 seconds"> | |
<!-- Silence Logback's own status messages about config parsing | |
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> --> | |
<!-- Simple file output --> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder --> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | |
<!-- rollover daily --> | |
<fileNamePattern>logs/buddy-auth-%d{yyyy-MM-dd}.%i.log</fileNamePattern> | |
<!-- or whenever the file size reaches 64 MB --> | |
<maxFileSize>64 MB</maxFileSize> | |
</rollingPolicy> | |
<!-- Safely log to the same file from multiple JVMs. Degrades performance! --> | |
<prudent>true</prudent> | |
</appender> | |
<!-- Console output --> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder --> | |
<encoder> | |
<pattern>%-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
<!-- Only log level INFO and above --> | |
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | |
<level>WARN</level> | |
</filter> | |
</appender> | |
<!-- Enable FILE and STDOUT appenders for all log messages. | |
By default, only log at level INFO and above. --> | |
<root level="WARN"> | |
<appender-ref ref="FILE" /> | |
<appender-ref ref="STDOUT" /> | |
</root> | |
<!-- For loggers in the these namespaces, log at all levels. --> | |
<logger name="user" level="ALL" /> | |
<!-- To log pedestal internals, enable this and change ThresholdFilter to DEBUG | |
<logger name="io.pedestal" level="ALL" /> | |
--> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment