• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logger Error

 
Mohnish Saini
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohnish Saini wrote:log4j jars and log4j.properties is also present with proper paths.
So you say.
 
Mohnish Saini
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic