wood burning stoves*
The moose likes Servlets and the fly likes Logger Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Logger Error" Watch "Logger Error" New topic
Author

Logger Error

Mohnish Saini
Greenhorn

Joined: Jan 04, 2009
Posts: 24
I have deployed a application which is in Servlet, JSP, EJB on BEA Weblogic 8.1 SP4 locally. The application is running fine but the logger is not working. Application is unable to log the warnings/errors in any log file. Application is log4j jars and log4j.properties is also present with proper paths.

Warning looks like:

log4j:WARN No appenders could be found for logger (com.ovid.links.admin.web.util .Initialiser).
log4j:WARN Please initialize the log4j system properly.

Thanks
Mohnish
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3827

Mohnish Saini wrote:
Warning looks like:

log4j:WARN No appenders could be found for logger (com.ovid.links.admin.web.util .Initialiser).
log4j:WARN Please initialize the log4j system properly.



Can you post your log4j.properties content ? How you are initializing log4j?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Mohnish Saini wrote:log4j jars and log4j.properties is also present with proper paths.
So you say.
Mohnish Saini
Greenhorn

Joined: Jan 04, 2009
Posts: 24
log4.properties contents

################################################################################
# Link Admin Tool Web application log file
# Set root logger level to ERROR. Set appenders adminToolLogger & sqlLogger.
################################################################################
log4j.rootLogger=ERROR, adminToolLogger, SQLLogger
log4j.appender.adminToolLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.adminToolLogger.File=C:/etc/opt/bea/UserRightsService/LinkAdminTool.log
log4j.appender.adminToolLogger.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.adminToolLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.adminToolLogger.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c.%M - %m%n

################################################################################
# Link Admin Tool SQL logging file
################################################################################
log4j.logger.com.ovid=INFO, SQLLogger
log4j.additivity.com.ovid.links.admin=false
log4j.appender.SQLLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SQLLogger.File=C:/etc/opt/bea/UserRightsService/LinkAdminToolSQL.log
log4j.appender.SQLLogger.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.SQLLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.SQLLogger.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c.%M - %m%n
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3827

You don't have your LinkAdminToolSQL.log file gets created in the specified location right ? How you are initializing the log4j in the application (using servlet) ? Provide your log4j initialization process also. I think problem may be in there. BTW I don't think you can log for two different files using the properties file (you may need log4j.xml).
 
Consider Paul's rocket mass heater.
 
subject: Logger Error