Example of using Log4jContextFactory?

2016-11-08 Thread COHEN, STEVEN M
The goal: to configure log4j2 logging on a standalone EJB deployed to a JBoss EAP7 server in an EJB jar. We do not wish to use the loggers supplied by JBoss for our applications. I find that I can deploy a log4j2.xml file at the root of the ejb jar and it does get seen by JBoss but logging st

Building log4j2 configuration files programmatically

2016-11-16 Thread COHEN, STEVEN M
We have the following requirements: There is a servlet that serves as a front end to many disparate EJBs. The servlet reads the request parameters , decides which EJB they tell it to invoke, invoke that EJB from a JNDI lookup on the server. Currently this is implemented on WebLogic, but we ar

RE: Building log4j2 configuration files programmatically

2016-11-16 Thread COHEN, STEVEN M
Apparently not. The kind of help I would like to have from log4j2 is some way of writing a configuration to disk. This doesn't seem to exist, at least not for xml configs. -Original Message- From: COHEN, STEVEN M Sent: Wednesday, November 16, 2016 12:00 PM To: log4j

RE: Building log4j2 configuration files programmatically

2016-11-16 Thread COHEN, STEVEN M
, COHEN, STEVEN M wrote: > We have the following requirements: > > There is a servlet that serves as a front end to many disparate EJBs. > The servlet reads the request parameters , decides which EJB they tell > it to invoke, invoke that EJB from a JNDI lookup on the server. &

RE: Building log4j2 configuration files programmatically

2016-11-16 Thread COHEN, STEVEN M
and then modifying it is documented on the web site. As I recall, someone is working on being something that will write the configuration to disk, but at the moment I don’t recall where it resides or what state it is in. Ralph > On Nov 16, 2016, at 10:59 AM, COHEN, STEVEN M wrote: > >

RE: Building log4j2 configuration files programmatically

2016-11-16 Thread COHEN, STEVEN M
g.apache.org/log4j/2.x/manual/customconfig.html > > Gary > > On Wed, Nov 16, 2016 at 9:59 AM, COHEN, STEVEN M wrote: > > > We have the following requirements: > > > > There is a servlet that serves as a front end to many disparate EJBs. > The > > servlet reads

Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
I am trying to construct a program that basically reads a bunch of log4j2 configuration files and combines them into one, writing this back to disk using the new ConfigurationBuilder.writeXmlConfiguration(OutputStream) method. But I run up against what seems to me to be a gap in the API unless

RE: Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
ining configuration files which is already implemented through composite configuration: http://logging.apache.org/log4j/2.x/manual/configuration.html#CompositeConfiguration On 17 November 2016 at 09:29, COHEN, STEVEN M wrote: > I am trying to construct a program that basically reads a

RE: Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
November 17, 2016 9:52 AM To: Log4J Users List Subject: Re: Copying appenders and loggers from a confgiruation to a builder Please feel free to record your feature request in JIRA: https://issues.apache.org/jira/browse/LOG4J2 Gary On Thu, Nov 17, 2016 at 7:47 AM, COHEN, STEVEN M wrote: > Th

RE: Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
sers List Subject: Re: Copying appenders and loggers from a confgiruation to a builder Please feel free to record your feature request in JIRA: https://issues.apache.org/jira/browse/LOG4J2 Gary On Thu, Nov 17, 2016 at 7:47 AM, COHEN, STEVEN M wrote: > Thanks, that almost works for me, and wil

RE: Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
rite c3 to disk right? sounds reasonable. Dare I mention... XSL? [Ducks under flying tomatoes.] Gary On Thu, Nov 17, 2016 at 9:41 AM, COHEN, STEVEN M wrote: > I don't think I'm able to do so. Although I set up an account on the > JIRA and have logged in, the only thing I&

RE: Copying appenders and loggers from a confgiruation to a builder

2016-11-17 Thread COHEN, STEVEN M
not apply the c3 configuration) write c3 to disk right? sounds reasonable. Dare I mention... XSL? [Ducks under flying tomatoes.] Gary On Thu, Nov 17, 2016 at 9:41 AM, COHEN, STEVEN M wrote: > I don't think I'm able to do so. Although I set up an account on the > JIRA an

jboss-logging vs log4j2 in ejb-client application

2017-01-16 Thread COHEN, STEVEN M
Our team is fairly standardized on using log4j2 over log4j, commons-logging or any other framework. This had presented some issues with jboss-eap which does not support log4j2. Nevertheless, for applications running on the jboss-server it was fairly easy, and even a good thing to package log4j

RE: jboss-logging vs log4j2 in ejb-client application

2017-01-16 Thread COHEN, STEVEN M
version you are using? I haven’t worked with JBoss in several years but would happy to take a look - if for no other reason than to do something with LOG4J2-18. Ralph > On Jan 16, 2017, at 9:11 AM, COHEN, STEVEN M wrote: > > Our team is fairly standardized on using log4j2 over log4j

RE: jboss-logging vs log4j2 in ejb-client application

2017-01-17 Thread COHEN, STEVEN M
what is actually missing. Ralph > On Jan 16, 2017, at 12:25 PM, COHEN, STEVEN M wrote: > > Thanks, Ralph, for busting my theory of the case. :-) > > I built a test application, from one of the examples floating around on the > Internet, added log4j2 to it, built the client and

Programmatically determine if logger is "OFF"

2017-03-30 Thread COHEN, STEVEN M
"OFF" is a level usable in a logging configuration file. I have a need to see if a logger is configured this way. There is no API in logger that checks this. There is a workaround of course - if isFatalEnabled() returns false, then the logger is OFF. But it would be trivial to add an isOff()

anomalies running log4j v 2.2 on Tomcat

2017-04-18 Thread COHEN, STEVEN M
I would be grateful for any input the members of this list can provide about the following situation. We are running Tomcat 8.0.39, deploying on it a number of web applications using log4j2, the jars for which are packaged into the war files. These webapps are built in various environments. On