AnsweredAssumed Answered

Alfresco Custom Logging

Question asked by kavilash23 on Jan 29, 2015
Latest reply on Oct 12, 2015 by kavilash23
Hi Guys,

I have installed the latest version of the Bulk Import Tool (1.3.1) and need to create a separate log file for it.

I have created the following file in $ALFRESCO_HOME/tomcat/shared/classes/alfresco/extension/bulk-log4j.properties with the following lines but when the bulkImport.log is generated, all the alfresco packages are being logged instead of just the bulk import tool (org.alfresco.extension.bulkfilesystemimport)

Can someone please advice on how i can have only logs for org.alfresco.extension.bulkfilesystemimport package?

# Set root logger level to error

log4j.rootLogger=error, Console, bFile

###### Console appender definition #######

# All outputs currently set to be a ConsoleAppender.

log4j.appender.Console=org.apache.log4j.ConsoleAppender

log4j.appender.Console.layout=org.apache.log4j.PatternLayout

# use log4j NDC to replace %x with tenant domain / username

log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n

#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

###### bFile appender definition #######

log4j.appender.bFile=org.apache.log4j.DailyRollingFileAppender

log4j.appender.bFile.File=bulkImport.log

log4j.appender.bFile.Append=true

log4j.appender.bFile.DatePattern='.'yyyy-MM-dd

log4j.appender.bFile.layout=org.apache.log4j.PatternLayout

log4j.appender.bFile.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] [%t] %m%n


######## Bulk Import Tool ######

log4j.logger.org.alfresco.extension.bulkfilesystemimport=debug


Outcomes