In TR.props, I changed the logging to run off Log4J but after launching the app, get the following error -
org.apache.turbine.services.InstantiationException: ServiceBroker: unknown service PoolService requested at org.apache.turbine.services.BaseServiceBroker.getServiceInstance(BaseServiceBroker.java:356) at org.apache.turbine.services.BaseServiceBroker.getService(BaseServiceBroker.java:298) at org.apache.turbine.util.RunDataFactory.putRunData(RunDataFactory.java:231) at org.apache.turbine.Turbine.doGet(Turbine.java:520)
Question:- Does Turbine 2.1 work with Log4J?
Regards, Akshay
Below is the TR.props log configuration -
# ------------------------------------------------------------------- # # L O G S # # ------------------------------------------------------------------- # This is the configuration for the logging system. In most cases # you don't need to modify anything. However, if you wish to add more # facilities or modify the existing settings, then you can do so. # # destination.file: A path relative to the web app root # ------------------------------------------------------------------- services.LoggingService.facilities=logforj,access services.LoggingService.default=logforj services.LoggingService.loggingConfig=org.apache.turbine.services.logging.PropertiesLoggingConfig
# A facility for system logging. services.LoggingService.system.destination.file=/WEB-INF/log/tomcat.log.log services.LoggingService.system.className=org.apache.turbine.services.logging.FileLogger services.LoggingService.system.level=DEBUG
# A facility for the scheduler service # To disable started/stopped messages set the level to ERROR services.LoggingService.scheduler.destination.file=/WEB-INF/log/tomcat.log.log services.LoggingService.scheduler.className=org.apache.turbine.services.logging.FileLogger services.LoggingService.scheduler.level=DEBUG
# A facility for debugging applications. Messages will go both # to the log file and the server console. services.LoggingService.debug.destination.file=/WEB-INF/log/tomcat.log.log services.LoggingService.debug.destination.console=true services.LoggingService.debug.className=org.apache.turbine.services.logging.FileLogger services.LoggingService.debug.level=DEBUG
# A facility for SQL query logging # To enable SQL query logging, set the level to DEBUG services.LoggingService.sql.destination.file=/WEB-INF/log/tomcat.log.log services.LoggingService.sql.className=org.apache.turbine.services.logging.FileLogger services.LoggingService.sql.level=DEBUG
# A facility for security audit. NOTE! As of 23 Jan 2001 # Turbine does not have any standard security auditing # functionality. It's up to your application. services.LoggingService.security.destination.file=/WEB-INF/log/tomcat.log.log services.LoggingService.security.className=org.apache.turbine.services.logging.FileLogger services.LoggingService.security.level=DEBUG
# An example configuration for using Log4Java, with log4j properties inline
# The category name - at the end of this line - needs to match the logging facility name - the first log4j.
# need this rootCategory entry to capture the torque/fulcrum etc logging
services.LoggingService.logforj.log4j.rootCategory = INFO, logforj
# need this category entry for the actual tomcat.log logging (I don't know why it doesn't get covered by the root category!)
services.LoggingService.logforj.log4j.category.logforj = DEBUG, logforj
services.LoggingService.logforj.log4j.appender.logforj.file =${webappRoot}/WEB-INF/log/tomcat.log.log
services.LoggingService.logforj.log4j.appender.logforj = org.apache.log4j.FileAppender
services.LoggingService.logforj.log4j.appender.logforj.layout = org.apache.log4j.PatternLayout
services.LoggingService.logforj.log4j.appender.logforj.layout.conversionPattern = [%d{dd MMM yyyy HH:mm:ss} %5p] - %m%n
services.LoggingService.logforj.log4j.appender.logforj.append = false
services.LoggingService.logforj.className=org.apache.turbine.services.logging.Log4JavaLogger
services.LoggingService.logforj.level=DEBUG
# An example configuration for portlet access audit logging
services.LoggingService.access.log4j.category.access = INFO, access
services.LoggingService.access.log4j.appender.access = org.apache.log4j.FileAppender
services.LoggingService.access.log4j.appender.access.layout = org.apache.log4j.PatternLayout
services.LoggingService.access.log4j.appender.access.layout.ConversionPattern = %m%n
services.LoggingService.access.log4j.appender.access.append = true
services.LoggingService.access.log4j.appender.access.file = ${webappRoot}/WEB-INF/log/access.log
services.LoggingService.access.className = org.apache.turbine.services.logging.Log4JavaLogger
services.LoggingService.access.level = INFO
# An example configuration for automatic log rotation using Log4Java # This will keep the log file size under 1MB and save up to 5 backup copies services.LoggingService.rotation.log4j.rootCategory = INFO, rotation services.LoggingService.rotation.log4j.category.rotation = DEBUG, rotation
services.LoggingService.rotation.log4j.appender.rotation.file = ${webappRoot}/WEB-INF/log/tomcat.log.log
services.LoggingService.rotation.log4j.appender.rotation = org.apache.log4j.RollingFileAppender
services.LoggingService.rotation.log4j.appender.rotation.layout = org.apache.log4j.PatternLayout
services.LoggingService.rotation.log4j.appender.rotation.layout.conversionPattern = [%d{dd MMM yyyy HH:mm:ss} %5p] - %m%n
services.LoggingService.rotation.log4j.appender.rotation.append = false
services.LoggingService.rotation.log4j.appender.rotation.MaxFileSize = 1024KB
services.LoggingService.rotation.log4j.appender.rotation.MaxBackupIndex = 5
services.LoggingService.rotation.className = org.apache.turbine.services.logging.Log4JavaLogger
services.LoggingService.rotation.level = DEBUG
# An example configuration for using *NIX syslogd with Log4Java services.LoggingService.syslog.destination.syslogd.host=my.syslog.server.com services.LoggingService.syslog.destination.syslogd.facility=LOG_DAEMON services.LoggingService.syslog.className=org.apache.turbine.services.logging.Log4JavaLogger services.LoggingService.syslog.level=INFO
# An example configuration for using remote Log4Java server services.LoggingService.remote.destination.remote.host=my.remote.server.com services.LoggingService.remote.destination.remote.port=1099 services.LoggingService.remote.className=org.apache.turbine.services.logging.Log4JavaLogger services.LoggingService.remote.level=INFO
# An example configuration for sending error reports as email with Log4Java # notes: # * uses 'mail.server' as SMTP server to send mail through # * log4j will send the email when an ERROR is logged, with # 'buffer.size' previous (non-ERROR) logs included in the email # * configured to log to a file as well otherwise stacktraces are lost services.LoggingService.email.destination.file=/WEB-INF/log/tomcat.log.log [EMAIL PROTECTED] [EMAIL PROTECTED] services.LoggingService.email.destination.email.subject=tomcat.log Error Report services.LoggingService.email.destination.email.buffer.size=512 services.LoggingService.email.className=org.apache.turbine.services.logging.Log4JavaLogger services.LoggingService.email.level=INFO
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
