I have a project that uses Apache Commons Logging & log4j with a large number of classes doing logging. 95% of my logs show up with the same prefix
log4j.appender.MyCompany.layout.ConversionPattern=[%d][%-5p][%c] %m%n
[2010-08-05 11:44:18,940][DEBUG][com.mycompany.projectname.config.XMLConfigSource] Loading config from [filepath] [2010-08-05 12:05:52,715][INFO ][com.mycompany.projectname.management.ManagerCore] Log entry 1 [2010-08-05 12:05:52,717][INFO ][com.mycompany.projectname.management.ManagerCore] Log entry 2
I know with %c{1}, I can just show the last part of the category (i.e. the class name), but is there a way to trim off the common portion 'com.mycompany.projectname' from each log under that package, considering how much room it takes up on each line?