go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Output
 
Subject: Output
Author: EricJ
In response to: How to load log4j.properties file?
Posted on: 09/07/2013 06:44:56 AM

Here come the CONSOLE output:

2013-09-06 19:26:19,235 - ERROR [main:SLF4j.hello@12] - Hello World!
2013-09-06 19:26:19,238 - WARN  [main:SLF4j.hello@13] - Hello World!
2013-09-06 19:26:19,238 - INFO  [main:SLF4j.hello@14] - Hello World!


and the FILE output:
2013-09-06 19:26:19,235 - ERROR [main:SLF4j@12] - Hello World!
2013-09-06 19:26:19,238 - WARN  [main:SLF4j@13] - Hello World!
2013-09-06 19:26:19,238 - INFO  [main:SLF4j@14] - Hello World!
2013-09-06 19:26:19,238 - DEBUG [main:SLF4j@14] - Hello World!


 

> On 09/07/2013 06:41:47 AM EricJ wrote:

Two basic ways:

1) via system property -Dlog4j.properties=<path_to_file>

2) Default to resource folder <resources>/log4j.properties






References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.