473,473 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Regarding Usage of log4j in java program..Plz help me...

2 New Member
Regarding to log4j in java program..Plz help me...
--------------------------------------------------------------------------------

Hai,
friends i used the log4j.properties file like as below......

log4j.rootLogger=VERBOSE, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppe nder

log4j.appender.stdout.layout=org.apache.log4j.Patt ernLayout

log4j.appender.stdout.layout.ConversionPattern=[%5p] %d[mm:ss]

i got[DEBUG] 2008-02-06 16:29:56,987[mm:ss] like this
but put some message in "logger.debug" .how can i get both the PatternLayout and ConversionPattern?

--------------------------------------------------------------------------------
Feb 7 '08 #1
2 1981
Monali2312
2 New Member
Regarding to log4j in java program..Plz help me...
--------------------------------------------------------------------------------

Hai,
friends i used the log4j.properties file like as below......

log4j.rootLogger=VERBOSE, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppe nder

log4j.appender.stdout.layout=org.apache.log4j.Patt ernLayout

log4j.appender.stdout.layout.ConversionPattern=[%5p] %d[mm:ss]

i got[DEBUG] 2008-02-06 16:29:56,987[mm:ss] like this
but put some message in "logger.debug" .how can i get both the PatternLayout and ConversionPattern?

--------------------------------------------------------------------------------
Can u try ur code by putting these lines
log4j.appender.file.threshold=info
log4j.appender.file.layout=org.apache.log4j.Patter nLayout
log4j.appender.file.layout.ConversionPattern=%d{AB SOLUTE} %5p %c{1}:%L - %m%n
Instead of file use stdout
Feb 7 '08 #2
rsrinivasan
221 New Member
Regarding to log4j in java program..Plz help me...
--------------------------------------------------------------------------------

Hai,
friends i used the log4j.properties file like as below......

log4j.rootLogger=VERBOSE, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppe nder

log4j.appender.stdout.layout=org.apache.log4j.Patt ernLayout

log4j.appender.stdout.layout.ConversionPattern=[%5p] %d[mm:ss]

i got[DEBUG] 2008-02-06 16:29:56,987[mm:ss] like this
but put some message in "logger.debug" .how can i get both the PatternLayout and ConversionPattern?

--------------------------------------------------------------------------------

see this link for further clarification Log4j
Feb 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Aaron Boxer | last post by:
Hello, My application is using a jar file MyJar.jar that uses log4j (I have the latest release of log4j). I have put both MyJar.jar and log4j.jar in a directory in my classpath. I have also...
4
by: Jan van Mansum | last post by:
Hello group, I have just been trying out the log4j library. As far as I understand the idea is to keep the logging statements in your, even in the release build. However, obviously you wouldn't...
1
by: Ragavendra BC | last post by:
Log4j Issue ----------- Hi, I am facing a problem related to Log4j... The problem is such that I have two different Log4j files one in ..properties format and the other in the .xml format.....
4
rsrinivasan
by: rsrinivasan | last post by:
Hi, I am using log4j to create log message. I want to write the log message to database. So i configured the log4j.properties files like this... # Database Configuration...
0
by: Hari2349 | last post by:
Hai, friends i used the log4j.properties file like as below...... log4j.rootLogger=VERBOSE, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender ...
1
by: Kedar Kachare | last post by:
How to use Log4j to create log files using file appender in a Servlet? Also, how to make that Servlet read the log4j.properties file? I have tried following: My web.xml( I use Eclipse europa)...
0
by: Mikhail Teterin | last post by:
Hello! I'm trying to use log4j's SMTPAppender to get warnings and errors reported by our application via e-mail (in addition to having ALL messages saved into a file via RollingFileAppender). ...
5
myusernotyours
by: myusernotyours | last post by:
Hi all, I have scoured the net for this opinion, and I have come to the conclusion that many think log4j is the superior API. I therefore would like to hear the opinion of you guys here at bytes. ...
5
by: Abhinay | last post by:
Hi there, I am working on server which used thread pool to process each client request by separate dedicated thread. My intention was each thread ( of thread pool ) have its own logger and hence...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.