This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Websphere and the fly likes log4j file logging problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "log4j file logging problem" Watch "log4j file logging problem" New topic

log4j file logging problem

Andrei Nistor

Joined: Aug 31, 2006
Posts: 9

I want to specify a path to put my logs.
I use winXPprof, eclipse 3.2, jdk1.6, log4j-1.2.14

The following is the


log4j.rootLogger=trace, stdout, R

log4j.appender.stdout.layout.ConversionPattern=%d %-5p %C{1}.%M - %m%n

log4j.appender.R.MaxFileSize= 10000KB # Keep one backup file
log4j.appender.R.layout.ConversionPattern=%d %-5p %C{1}.%M - %m%n


Problem is i cannot find where it logs my application. I use a swing application.

Live long and prosper!
Paul Clapham

Joined: Oct 14, 2005
Posts: 19338

"Andrei N.", welcome to JavaRanch.

We're a friendly group here, but we do require members to have valid display names.

Display names include your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.
Hanumanth Kanthi
Ranch Hand

Joined: May 27, 2004
Posts: 74
I see that your appender's "File" is set to "logs/qt.log" so I would guess that it will attempt to write to that file. and the "logs" directory is expect to be under the current working directory at the time when you started you application, or user home directory if you started the app from windows desktop/menu.

Also, if the logs directory does not exist (in either place) then you might get no log file. Try setting that value to c:\\qt.log and see if it gets created.

H. Kanthi
rocket mass heater kickstarter
subject: log4j file logging problem