-
1. Re: writing own standalone module that needs legacy log4j support
jaikiran Nov 19, 2012 9:59 PM (in response to mazz)My guess is that the log4j.xml isn't being picked up. Where exactly is that located?
John Mazzitelli wrote:
Oh, and where exactly is log4j getting is configuration if not from my module's own logj4.xml?
Adding -Dlog4j.debug=true system property while starting the server might help in understanding that (you'll see the system.out messages from log4j, telling you what it's upto).
-
2. Re: writing own standalone module that needs legacy log4j support
dmlloyd Nov 20, 2012 9:27 AM (in response to mazz)You'll need to do a Couple Things to make it work. Our log4j is modified for the purpose of forwarding through the LogManager. So step one is, you'll have to make sure your module has a dependency on "org.jboss.logmanager" with 'services="import"' set.
Next, I believe you'll have to configure a LogManager-style logging.properties in your module as our log4j won't be configuring itself. Once you do these things you *should* get some output.
-
3. Re: writing own standalone module that needs legacy log4j support
mazz Nov 20, 2012 11:21 AM (in response to dmlloyd)Thanks folks. So, I got it to work by adding the org.jboss.logmanager with services=import in modules.xml and I put a logging.properties file in the root directory of my module's main jar file. I did do both of those before, but not at the same time which is why it wasn't working for me :-) So, making sure I do both of those fixed the problem. Note that having a log4j.xml doesn't matter - I don't have a log4j.xml and things still worked.