Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2007, 08:54 PM
bbq bbq is offline
Senior Member
 
Join Date: Jun 2007
Posts: 134
bbq is on a distinguished road
log4java problems
I'm using the log4java, and I would like to write in a lot of log file, but I couldn't do it

this is my log4java.properties:
log4j.rootLogger=DEBUG,apFile,myLog
.....
log4j.appender.myLog=org.apache.log4j.RollingFileA ppender
log4j.appender.myLog.File=c:/genlog.log
log4j.appender.myLog.append = true
log4j.appender.myLog.layout=org.apache.log4j.Patte rnLayout
log4j.appender.myLog.layout.ConversionPattern=%d %-5p [%c] %C.%M(%L) - %m%n
log4j.appender.myLog.MaxFileSize=10000KB


and I do this en java class
Code:
Logger myLogger = Logger.getLogger("myLog"); myLogger.debug("message");

in the path: c:/genlog.log appears this messages generates by this line

Code:
protected static Logger logger=Logger.getRootLogger();
then I wrote this code:

Code:
log4j.rootLogger=DEBUG,apFile
and this warn returns to me
log4j:WARN No appenders could be found for logger (apbatchTask).
log4j:WARN Please initialize the log4j system properly.

any ideas?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems in JSP : Need help raj4u JavaServer Pages (JSP) and JSTL 1 02-07-2008 12:06 PM
GUI problems. saytri New To Java 1 12-17-2007 12:27 AM
gui problems bluebirdjc Advanced Java 2 07-23-2007 07:38 PM
a few problems gary AWT / Swing 0 07-11-2007 06:57 PM
problems with JPA Ed New To Java 2 07-04-2007 07:34 AM


All times are GMT +3. The time now is 12:32 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org