Hi,
We use log4j2 along with slf4j in our application. And now we try to change
log level dynamically.
Can you please provide me the mbean details so that we can change the log
level during run time via jmx. For this we need to use jolokia(it’s a
remote JMX with JSON over http)
Thanks
Please see the Javadoc for the log4j MBean interfaces. Especially the PATTERN
constant.
http://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/jmx/package-frame.html
Sent from my iPhone
On 2014/07/31, at 18:54, sujatha rdn sujatha...@wavecrest.gi wrote:
Hi,
Thank you Remko and Ralph! That clarifies a lot. Then I have to ask, if my
pattern only contains a %d, what value should I use as max value? Does it
matter at all?
Thanks!
On Wed, Jul 30, 2014 at 8:23 PM, Remko Popma remko.po...@gmail.com wrote:
I stand corrected. Thanks, Ralph!
Sent from
No, it does not matter.
Sent from my iPad
On Jul 31, 2014, at 7:31 AM, Mariano Gonzalez mariano.l.gonza...@gmail.com
wrote:
Thank you Remko and Ralph! That clarifies a lot. Then I have to ask, if my
pattern only contains a %d, what value should I use as max value? Does it
matter at all?
Hi,
I'm trying to get log4j 2.0 debug information printed out in the console
but I couldn't manage to get them.
In log4j 1.x you would set the system property log4j.debug.
I thought that the mechanism was similar in log4j 2.x and apparently it
should be by setting
The original design was to have the status logger capture messages in a ring
buffer. Then when a listener became available it could print the queued
messages. I know it has been tweaked recently so I am not 100% sure if it is
still working that way, but that is why it is a bit more complicated
All you need to do is set status=trace in your log4j2.xml config file.
So the beginning of your config looks like this:
Configuration status=trace ...
Sent from my iPhone
On 2014/08/01, at 1:13, Marco Cosentino cosentino...@gmail.com wrote:
Hi,
I'm trying to get log4j 2.0 debug
Hi,
I'm trying to use a custom ConfigurationFactory. I created and annotated it
with a @Plugin and an @Order like this:
@Plugin(category = ConfigurationFactory, name =
StartupConfigurationFactory)
@Order(10)
public class StartupConfigurationFactory extends ConfigurationFactory{
...
}
But it is
The configuration factory is responsible for parsing a config file and creating
a Configuration object. As such, it must exist _before_ the configuration file
is processed.
Log4j plugins are only created during processing of the config file. So a
configuration factory cannot be a plugin.
Oh ! I did this because of the documentation available here:
http://logging.apache.org/log4j/2.x/manual/extending.html#ConfigurationFactory
The second method is by defining the ConfigurationFactory as a Plugin.
And why all others ConfigurationFactories are declared as @Plugin ?
@Plugin(name =
I think you may still need to set the system property (or equivalent
properties file) to override the default ConfigurationFactory.
On 31 July 2014 21:34, Clément Guillaume cguilla...@hotpads.com wrote:
Oh ! I did this because of the documentation available here:
What is the equivalent properties file, considering that I use a custom
file format and a custom parser ?
Clément
On Thu, Jul 31, 2014 at 7:37 PM, Matt Sicker boa...@gmail.com wrote:
I think you may still need to set the system property (or equivalent
properties file) to override the default
The property is named log4j.configurationFactory.
How are you building your custom ConfigurationFactory? If you're using an
IDE, you'll have to enable annotation processing in your settings.
Otherwise, you'll have to override it with the system property.
On 31 July 2014 22:30, Clément Guillaume
Matt,
Your answer is incorrect. No system property needs to be set.
Ralph
On Jul 31, 2014, at 7:37 PM, Matt Sicker boa...@gmail.com wrote:
I think you may still need to set the system property (or equivalent
properties file) to override the default ConfigurationFactory.
On 31 July 2014
Remko,
Your answer is incorrect. All ConfigurationFactories are annotated as plugins.
Ralph
On Jul 31, 2014, at 7:04 PM, Remko Popma remko.po...@gmail.com wrote:
The configuration factory is responsible for parsing a config file and
creating a Configuration object. As such, it must exist
Your annotations are correct. However, in the code snippet below you don’t show
what getSupportedTypes() returns. The generic ConfigurationFactory inspects all
the ConfigurationFactory plugins using the order to determine which should be
inspected first, second, etc. It calls getSupportedTypes
It also occurs to me that the plugin manager may not be finding the plugin. If
you are using 2.0 then I believe the annotation processor should register the
factory as a plugin automatically. If you are using an older release you might
have been required to call
17 matches
Mail list logo