• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Logger Error

 
Ranch Hand
Posts: 31
  • 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
 
Bartender
Posts: 4106
72
Hibernate Fedora Chrome
  • 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?
 
Marshal
Posts: 67299
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Ranch Hand
Posts: 31
  • 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: 4106
72
Hibernate Fedora Chrome
  • 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).
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!