Am sure this has been asked before but i could not find code that works Looking for an example of code where there is no UI. Batch mode, give a file path, a config file (log4j2), get call backs of log events read to a listener method. Possible in chainsaw or other FOSS?
Psudedo code: Set it up: File myLogFile = new File("path/a.log") File myConfigFile = new File("path/log4j.xml") myListener listr = new MyLsitenter(); theLibrary.process(listr, myConfigFile, myLogFile); In the listener public void onEvnt(LogRecord logRecord){ logRecord.getDate(); logRecord.getThread() logRecord.getLevel(); logRecord.getMessage() ; //could be multiline too,etc -- Regards Tushar Kapila