Bamboo version 5.0.1
I have access logging going to a separate file (atlassian-bamboo-access.log) with a second appender, but the access logging still shows up in the standard logs (atlassian-bamboo.log).
Here is my log4j.properties:
# # Change the following line to configure the bamboo logging levels (one of INFO, DEBUG, ERROR, FATAL) # log4j.rootLogger=WARN, bamboolog #using 'bamboo home aware' appender. If the File is relative a relative Path the file goes into {bamboo.home}/logs log4j.appender.bamboolog=com.atlassian.bamboo.log.BambooRollingFileAppender log4j.appender.bamboolog.File=/opt/atlassian/logs/bamboo/atlassian-bamboo.log log4j.appender.bamboolog.MaxFileSize=61440KB log4j.appender.bamboolog.MaxBackupIndex=20 log4j.appender.bamboolog.layout=org.apache.log4j.PatternLayout log4j.appender.bamboolog.layout.ConversionPattern=%d %p [%t] [%c{1}] %m%n # This log below gives more correct line can class details #log4j.appender.console.layout.ConversionPattern=%d %p [%t] [%C{1}:%L] %m%n #log4j.appender.bamboolog.layout.ConversionPattern=%d %p [%t] [%C{1}:%L] %m%n ######################################################################################################################## # Access Log ######################################################################################################################## log4j.category.com.atlassian.bamboo.filter.AccessLogFilter=INFO, accesslog log4j.additivity.com.atlassian.bamboo.util.AccessLogFilter=false log4j.appender.accesslog=org.apache.log4j.RollingFileAppender log4j.appender.accesslog.Threshold=DEBUG log4j.appender.accesslog.File=/opt/atlassian/logs/bamboo/atlassian-bamboo-access.log log4j.appender.accesslog.MaxFileSize=61440KB log4j.appender.accesslog.MaxBackupIndex=20 log4j.appender.accesslog.layout=org.apache.log4j.PatternLayout log4j.appender.accesslog.layout.ConversionPattern=%d %p [%t] [%c{1}] %m%n
The WEB-INF/web.xml:
<filter> <filter-name>accessLogFilter</filter-name> <filter-class>com.atlassian.bamboo.filter.AccessLogFilter</filter-class> </filter> <filter-mapping> <filter-name>accessLogFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>
Again, everything logs correctly to the atlassian-bamboo-access.log file, but I'm also seeing the access logging in the standard logs - which I would like to stop - so that access logging only goes to the access logs.
I suppose I should say I took this from the Confluence docs and modified the classes use "bamboo" instead of "confluence" so I'm guessing there may be a difference I'm not accounting for.
Ideas?
Figured this out, if anyone is interested in bamboo access logging to unique file. There's a very solid chance it was working in the above example, but the declared logging location wasn't where I expected it to be
######################################################################################################################## # Application Log ######################################################################################################################## log4j.rootLogger=INFO, bamboolog log4j.appender.bamboolog=com.atlassian.bamboo.log.BambooRollingFileAppender log4j.appender.bamboolog.File=/opt/atlassian/logs/bamboo/atlassian-bamboo.log log4j.appender.bamboolog.MaxFileSize=61440KB log4j.appender.bamboolog.MaxBackupIndex=20 log4j.appender.bamboolog.layout=org.apache.log4j.PatternLayout log4j.appender.bamboolog.layout.ConversionPattern=%d %p [%t] [%c{1}] %m%n ######################################################################################################################## # Access Log ######################################################################################################################## log4j.appender.accesslog=org.apache.log4j.RollingFileAppender log4j.appender.accesslog.Threshold=DEBUG log4j.appender.accesslog.File=/opt/atlassian/logs/bamboo/atlassian-bamboo-access.log log4j.appender.accesslog.MaxFileSize=61440KB log4j.appender.accesslog.MaxBackupIndex=20 log4j.appender.accesslog.layout=org.apache.log4j.PatternLayout log4j.appender.accesslog.layout.ConversionPattern=%d %p [%t] [%c{1}] %m%n log4j.category.com.atlassian.bamboo.filter.AccessLogFilter=INFO, accesslog log4j.additivity.com.atlassian.bamboo.filter.AccessLogFilter=false
I have also tried with log4j.appender.bamboolog=org.apache.log4j.RollingFileAppender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.