views:

265

answers:

0

log4j = {

appenders {
    appender new org.apache.log4j.DailyRollingFileAppender(name: "friendsJob", datePattern: "'.'yyyy-MM-dd", file: "C:/temp/log/friends/friendsJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n') )
    appender new org.apache.log4j.DailyRollingFileAppender( name: "followerJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/follower/followerJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n') )
    appender new org.apache.log4j.DailyRollingFileAppender( name: "mentionJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/mention/mentionJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n')  )
    appender new org.apache.log4j.DailyRollingFileAppender( name: "autoFollowJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/autofollow/autoFollowJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n') )
    appender new org.apache.log4j.DailyRollingFileAppender( name: "retweetJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/retweet/retweetJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n') )
    appender new org.apache.log4j.DailyRollingFileAppender( name: "profileUpdateJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/profileUpdate/profileUpdateJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n'))
    appender new org.apache.log4j.DailyRollingFileAppender( name: "searchJob", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/Search/searchJob.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n'))
    appender new org.apache.log4j.DailyRollingFileAppender( name: "appLog", datePattern: "'.'yyyy-MM-dd", file: "c:/temp/log/AppLog/appLog.log", layout: pattern(conversionPattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] %p %c{5} %m%n'))
}

info friendsJob: 'grails.app.task.twitter.FriendsListJob'
info followerJob: 'grails.app.task.twitter.FollowersListJob'
info mentionJob: 'grails.app.task.twitter.MentionJob'
info autoFollowJob: 'grails.app.task.twitter.AutoFollowJob'
info retweetJob: 'grails.app.task.twitter.RetweetsJob'
info profileUpdateJob: 'grails.app.task.twitter.ProfileUpdateJob'
info searchJob: 'grails.app.task.twitter.SearchJob'
info appLog: 'grails.app', 
        'grails.app.controller',
        'grails.app.bootstrap',
        'grials.app.dataSource',
        'grails.app.tagLib',
        'grails.app.service',
        'grails.app.domain',
        'commons',
        'jsontwitter'
root {
    additivity = true
}

}

Well the above work fine for me for all the logs except the final appender "appLog". Services and Controllers logs along with other specified are being output to console but not to the file [appLog.log]. Any clue why?

Also when I create the war from this configurations and deploy the app on tomcat I see enormous DEBUG level logging from everything. Why?

Please help, its killing me now.

Thanks, Alam Sher