Hi Sam,
That appears to have done the trick!
Thanks,
Bruce.
On Fri, 15 Aug 2008, ROWLEY Sam wrote:
> Hi Bruce,
>
> I've been digging in the IdP source code and it looks like the logger
> for the transaction log is created with an unusual name so it's
> bypassing your log4j configuration.
>
> The messages you're getting in your tomcat log are generated by this
> class
>
> edu/internet2/middleware/shibboleth/idp/provider/ShibbolethV1SSOHandler.
> java
>
> which uses a transactionLog object which is created by this class
>
> edu/internet2/middleware/shibboleth/idp/IdPResponder.java
> line 108 : transactionLog = Logger.getLogger("Shibboleth-TRANSACTION");
>
> As you can see, the logger is called Shibboleth-TRANSACTION which means
> it won't get configured by any of the directives in your
> log4j.properties file. That would account for the messages appearing in
> your tomcat log.
>
> Try adding a line for this Shibboleth-TRANSACTION logger to your
> log4j.properties file. Your list of loggers should end up looking like
> this:
>
> ## Shibboleth-IdP
> log4j.logger.org.apache.xml.security=INFO, SHIB_APPENDER, SYSLOG
> log4j.logger.edu.internet2.middleware.shibboleth=INFO, SHIB_APPENDER,
> SYSLOG
> log4j.logger.Shibboleth-TRANSACTION=INFO, SHIB_APPENDER, SYSLOG
>
> With any luck this will configure the Shibboleth-TRANSACTION logger to
> append it's messages to your Shibboleth IdP log and the syslog.
>
> Your idp.xml file should have the original logging section commented out
> in favour of the log4j logging section as below.
>
> <!--
> <Logging>
> <ErrorLog level="INFO"
> location="file:/usr/local/shibboleth-idp/logs/shib-error.log" />
> <TransactionLog level="INFO"
> location="file:/usr/local/shibboleth-idp/logs/shib-access.log" />
> </Logging>
> -->
> <!-- Uncomment the configuration section below and comment out
> the one above if you would like to manually configure log4j -->
> <Logging>
> <Log4JConfig
> location="file:/usr/local/tomcat5.5/common/classes/log4j.properties" />
> </Logging>
>
>
> Hope it works. Let us know how you get on.
>
> Cheers,
>
> Sam
>
>
> Sam Rowley
> Learning Development Manager
> Learning Development and Innovation
> Academic Development Institute
> Staffordshire University
> College Road
> Stoke-on-Trent
> ST4 2XS
>
> Telephone: 01782 29 5730
> Email: [log in to unmask] <mailto:[log in to unmask]>
>
>
>> -----Original Message-----
>> From: Discussion list for Shibboleth developments
>> [mailto:[log in to unmask]] On Behalf Of Bruce Rodger
>> Sent: 15 August 2008 14:54
>> To: [log in to unmask]
>> Subject: Re: idp logging question
>>
>> On Fri, 15 Aug 2008, ROWLEY Sam wrote:
>>
>>> Hi Bruce,
>>>
>>> Can you show us the contents of your log4j.properties file? The IdP
>>> configuration
>>
>> Ooop - I meant to append it to the original message!
>>
>> Largely unmodified, as far as I can see, other than the
>> addition of the SYSLOG clauses.
>>
>>
>> #### Configures Log4j as the Tomcat system logger #### #
>> Configure the logger to output info level messages into a
>> rolling logfile.
>> log4j.rootLogger=INFO, TOMCAT_APPENDER
>> #
>> # To continue using the "catalina.out" file (which grows
>> forever), # comment out the above line and uncomment the next.
>> #log4j.rootLogger=ERROR, A1
>>
>> ## Shibboleth-IdP
>> log4j.logger.org.apache.xml.security=INFO, SHIB_APPENDER,
>> SYSLOG #log4j.logger.org.apache.xml.security=DEBUG,
>> SHIB_APPENDER, SYSLOG
>> log4j.logger.edu.internet2.middleware.shibboleth=INFO,
>> SHIB_APPENDER, SYSLOG
>> #log4j.logger.edu.internet2.middleware.shibboleth.xml=DEBUG
>> #log4j.logger.edu.internet2.middleware.shibboleth.idp=DEBUG
>> #log4j.logger.edu.internet2.middleware.shibboleth.idp.IdPRespo
>> nder=DEBUG
>> #log4j.logger.edu.internet2.middleware.shibboleth.idp.IdPConfi
>> gLoader=DEBUG
>> #log4j.logger.edu.internet2.middleware.shibboleth.aa=DEBUG
>> #log4j.logger.edu.internet2.middleware.shibboleth.aa.attrresolv=DEBUG
>>
>> # Configuration for standard output ("catalina.out").
>> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>>
>> # Configuration for a rolling log file ("tomcat.log").
>> log4j.appender.TOMCAT_APPENDER=org.apache.log4j.DailyRollingFi
>> leAppender
>> log4j.appender.TOMCAT_APPENDER.DatePattern='.'yyyy-MM-dd
>> # Edit the next line to point to your logs directory.
>> # The last part of the name is the log file name.
>> log4j.appender.TOMCAT_APPENDER.File=${catalina.home}/logs/tomcat.log
>> log4j.appender.TOMCAT_APPENDER.layout=org.apache.log4j.PatternLayout
>> #log4j.appender.R.MaxBackupIndex=10
>> #log4j.appender.R.MaxFileSize=10MB
>> # Print the date in ISO 8601 format:
>> #log4j.appender.TOMCAT_APPENDER.layout.ConversionPattern=%d
>> [%t] %-5p %c - %m%n
>> log4j.appender.TOMCAT_APPENDER.layout.ConversionPattern=%d{HH:
>> mm:ss,SSS} [%t] %-5p %m - %c [%d{yyyyMMdd}]%n
>>
>> # Configuration for a rolling log file ("shibboleth-idp.log").
>> log4j.appender.SHIB_APPENDER=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.SHIB_APPENDER.DatePattern='.'yyyy-MM-dd
>> # Edit the next line to point to your logs directory.
>> # The last part of the name is the log file name.
>> log4j.appender.SHIB_APPENDER.File=${catalina.home}/logs/shibbo
>> leth-idp.log
>> log4j.appender.SHIB_APPENDER.layout=org.apache.log4j.PatternLayout
>> # Print the date in ISO 8601 format:
>> #log4j.appender.SHIB_APPENDER.layout.ConversionPattern=%d
>> [%t] %-5p %c - %m%n
>> log4j.appender.SHIB_APPENDER.layout.ConversionPattern=%d{HH:mm
>> :ss,SSS} %-5p %m - %c [%t;%d{yyyyMMdd}]%n
>>
>>
>> ## Here is a syslog example
>> log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
>> log4j.appender.SYSLOG.syslogHost=loghost.net.strath.ac.uk
>> log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
>> #log4j.appender.SYSLOG.layout.ConversionPattern=%d{dd-MM-yyyy
>> HH:mm:ss} %-5p (%C :%M:%L) - %m%n
>> log4j.appender.SYSLOG.layout.ConversionPattern=%d{HH:mm:ss,SSS
>> } [%t] %-5p %m - %c [%d{yyyyMMdd}]%n
>> log4j.appender.SYSLOG.Facility=LOCAL6
>>
>>
>> ###
>> ### original file contents
>> ###
>>
>> # Configuration for a rolling log file ("tomcat.log").
>> log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.R.DatePattern='.'yyyy-MM-dd
>> # Edit the next line to point to your logs directory.
>> # The last part of the name is the log file name.
>> log4j.appender.R.File=/var/log/shibboleth/tomcat.log
>> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>> #log4j.appender.R.MaxBackupIndex=10
>> #log4j.appender.R.MaxFileSize=10MB
>> #
>> # Print the date in ISO 8601 format
>> log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>>
>>
>> #REALM log settings
>> log4j.logger.org.apache.catalina.realm=DEBUG
>> #
>> # Application logging options
>> #log4j.logger.org.apache=DEBUG
>> #log4j.logger.org.apache=INFO
>> #log4j.logger.org.apache.struts=DEBUG
>> #log4j.logger.org.apache.struts=INFO#log4j.logger.org.apache.c
>> atalina.core.ContainerBase.[Catalina]=DEBUG, R
>> #log4j.logger.org.apache.catalina.core=DEBUG, R
>> #log4j.logger.org.apache.catalina.session=DEBUG, R
>>
>>
>>
>>
>>
>>
>>
>> --
>> Bruce Rodger [log in to unmask]
>> Network Manager, IT Services
>> |http://www.strath.ac.uk/IT/People/bruce.html
>> The University of Strathclyde | +44 (0)141 548 3300
>> Glasgow G4 0LN, Scotland. | Fax 553 4100
>>
>> "The University of Strathclyde is a charitable body,
>> registered in Scotland, number SC015263."
>>
>
>
> The information in this email is confidential and is intended solely for the addressee. Access to this email by anyone else is unauthorised.
>
>
>
> If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, except for the purpose of delivery to the addressee, is prohibited and may be unlawful. Kindly notify the sender and delete the message and any attachment from your computer.
>
--
Bruce Rodger [log in to unmask]
Network Manager, IT Services |http://www.strath.ac.uk/IT/People/bruce.html
The University of Strathclyde | +44 (0)141 548 3300
Glasgow G4 0LN, Scotland. | Fax 553 4100
"The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263."
|