diff options
Diffstat (limited to 'java-hibernate/cfg')
-rw-r--r-- | java-hibernate/cfg/logback-test.xml | 14 | ||||
-rw-r--r-- | java-hibernate/cfg/logback.xml | 20 |
2 files changed, 20 insertions, 14 deletions
diff --git a/java-hibernate/cfg/logback-test.xml b/java-hibernate/cfg/logback-test.xml deleted file mode 100644 index faa53b9..0000000 --- a/java-hibernate/cfg/logback-test.xml +++ /dev/null @@ -1,14 +0,0 @@ -<configuration> - - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> - </encoder> - </appender> - - <root level="error"> - <appender-ref ref="STDOUT" /> - </root> - -</configuration> diff --git a/java-hibernate/cfg/logback.xml b/java-hibernate/cfg/logback.xml new file mode 100644 index 0000000..9f3c839 --- /dev/null +++ b/java-hibernate/cfg/logback.xml @@ -0,0 +1,20 @@ +<configuration debug="false"> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>/tmp/java-hibernate.log</file> + <encoder> + <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="FILE" /> + </root> + +</configuration> |