2 Replies Latest reply on Sep 30, 2013 2:47 PM by Matthew So

    Dynamic file and appender creation using Log4j under JBoss EAP 6.1

    Matthew So Newbie

      Hi all,

       

        I am able to merge existing log4j.xml into standalone.xml, so my module can use log4j (provided by JBoss - I did not pack my log4j jar in my module) for logging as well.

        I see that for appender and file that defined in standalone.xml, JBoss will create those file and register the appender so logging to those appender / logfile is not an issue.

        When I tried to dynamically create a appender (along with file name), and assign that to the logger, I expect log4j will create the file (in the FileAppener.setfile() method, bug 9150), and the appender will get registered without issue.  However, that is not the case - I cannot see the log file getting created in the file system, and I see a message complains that about null appender.

        Please let me know if I have missed any configuration / setting.  Thanks in advance!

      Regards,

      Matthew