Summary: | add activity log to plugins | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Norbert Thiebaud <nthiebaud> |
Component: | ci-infra | Assignee: | DavidO <d.ostrovsky> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Norbert Thiebaud
2013-10-20 05:17:38 UTC
Done. $>cat /home/gerrit2/gerrit2_lo/logs/shell_activity.log 2013-10-20 09:18:08,618::shell:>start 2013-10-20 09:18:14,807:davido:shell:/home/gerrit2/bin/say-hello --user davido --groups 'Administrators' Norbert -a foo bar 2013-10-20 09:18:43,282::shell:>stop Documentation: activity loggin is using standard Java log4j facility: http://logging.apache.org/log4j/2.x/manual Configuration is controlled by: /home/gerrit2/gerrit2_lo/etc/log4j.properties Custom logging configuration must be activated in Gerrit (only supported from Gerrit 2.8), in [container] section in $site/gerrit.config -Dlog4j.configuration must be set: [container] javaOptions = -Dlog4j.configuration=file:///home/gerrit2/gerrit2_lo/etc/log4j.properties In log4j.properties section the appender and category must be activated: log4j.logger.shell.activity_log=INFO, shell_appender log4j.additivity.shell.activity_log=false log4j.appender.shell_appender=org.apache.log4j.DailyRollingFileAppender log4j.appender.shell_appender.datePattern='-'yyyy-MM'.log' log4j.appender.shell_appender.File=logs/shell_activity.log log4j.appender.shell_appender.layout=org.apache.log4j.PatternLayout log4j.appender.shell_appender.layout.ConversionPattern=%d{ISO8601}:%m%n See log4j manual for further infomration, particularly appender and coonversation sections: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html http://logging.apache.org/log4j/2.x/manual/layouts.html Another IRC session: * don't use rolling file appender: Done. * don't have ':' in timestamp: Done. * Ensure that the timestamp is UTC: Done Currently the log4j configuration is as follow: log4j.appender.logfile=org.apache.log4j.FileAppender log4j.appender.logfile.File=logs/error.log log4j.appender.logfile.layout=org.apache.log4j.EnhancedPatternLayout log4j.appender.logfile.layout.ConversionPattern=%d{yyyyMMdd HHmmss,SSS}{UTC}:%m%n and the result: 20131020 182942,415::shell:>start 20131020 183427,230:davido:shell:/home/gerrit2/bin/say-hello --user davido --groups 'Administrators' -a foo bar |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.