Hi,
I want to add the logs to separate log file for all scripts in <jira-home>/scripts/mypackage
I have added the following into log4j.properties:
log4j.appender.GWLogger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.GWLogger.File=mylogs.log
log4j.appender.GWLogger.MaxFileSize=20480KB
log4j.appender.GWLogger.MaxBackupIndex=5
log4j.appender.GWLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.GWLogger.layout.ConversionPattern=%d %t %p %X{{system-name}.username} [%c{4}] %m%n
log4j.appender.GWLogger.datePattern='.'yyyy-MM-dd-HH-mm
log4j.logger.com.Mylogger=DEBUG, console,GWLogger
And also added the following into my script:
import org.apache.log4j.Logger
def log = Logger.getLogger("com.Mylogger")
log.setLevel(org.apache.log4j.Level.DEBUG)
log.debug "debug statements"
It added logs into atlassian-jira.log instead of creating new log file with name mylogs.log and adding logs into it.
I tried to follow the instructions from Advanced logging , it did not worked, Can anyone help me please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.