• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logger Error

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohnish Saini wrote:log4j jars and log4j.properties is also present with proper paths.

So you say.
 
Mohnish Saini
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic