Re: [External] Re: How to encode %m or %ex ?

2018-01-26 Thread Mikael Ståldal
It is documented here: https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout right? On 2018-01-26 17:33, Matt Sicker wrote: The %encode{}{JSON} pattern was added in version 2.8.2. It doesn't appear to be documented on the layout manual page, but the feature is mentioned in

Re: Chainsaw log-parsing classes

2018-01-20 Thread Mikael Ståldal
Maybe we could take some code from Chainsaw and implement a LogEventParser for Log4j 2? https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/parser/TextLogEventParser.java On 2018-01-19 17:00, Scott Deboy wrote: Here's info on how you

Re: Chainsaw log-parsing classes

2018-01-20 Thread Mikael Ståldal
FWIW, Log4j 2's log4j-core has an API to parse the output of JsonLayout, XmlLayout and YamlLayout: https://github.com/apache/logging-log4j2/tree/master/log4j-core/src/main/java/org/apache/logging/log4j/core/parser On 2018-01-19 16:32, Joseph Husby wrote: Hello! I’m working on a project

Re: [External] Re: Log4j2 Async logger fallback method

2018-01-18 Thread Mikael Ståldal
, waitStrategy=TimeoutBlockingWaitStrategy, exceptionHandler=org.apache. logging.log4j.core.async.AsyncLoggerConfigDefaultExceptionHandler@66dd2d36... Do you have any idea how can I configure these values? Thanks and greetings, Christian On 04.01.18, 12:00, "Mikael Ståldal" <mi.

Re: Rename log4j2.xml

2018-01-10 Thread Mikael Ståldal
Now you can also use system property "log4j2.configurationFile" or environment variable "LOG4J_CONFIGURATION_FILE", according to: http://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties BTW, the documentation says this is for XML or JSON configuration files, but it works

Re: [External] Re: Log4j2 Async logger fallback method

2018-01-04 Thread Mikael Ståldal
Or include a log4j2.component.properties file in classpath. https://logging.apache.org/log4j/2.x/manual/configuration.html#System_Properties On 2018-01-03 17:57, Matt Sicker wrote: Those are system properties, but in log4j 2.10+, you can also use an environment variable instead. On 3 January

Re: Log4j Stacktrace - Only have certain lines in stacktrace

2017-12-11 Thread Mikael Ståldal
On 2017-12-02 16:01, Debraj Manna wrote: In my stacktrace I only want to have lines starting with let's say com.xyz. Is it possible to have something like the solution discussed in this answer ? As far as I know, it is currently not possible to do

Re: monitorInterval not working in tomcat

2017-12-03 Thread Mikael Ståldal
First, remove log4j-1.2.14.jar from classpath. Then make sure you use the same version of all Log4J 2.x jars, now you are mixing 2.4 with 2.6.2. On 2017-12-03 17:07, Enric Jaen wrote: log4j2 is working fine, but not the auto reload. I have tried several configurations but none has worked.

Re: Fwd: Include location and performance

2017-11-27 Thread Mikael Ståldal
If you use Scala, you could use macros. On 2017-11-27 13:47, Martin Všetička wrote: Hi, I use Log4j2 with async logger and includeLocation=true. As the manual warns, it slows down my application 4 times. Are there any tips how to obtain location information without runtime performance hit? *

Re: [ANNOUNCEMENT] Apache Log4j 2.10.0 released

2017-11-25 Thread Mikael Ståldal
Please note that the log4j-nosql module is gone in 2.10.0. It has been split up and replaced with log4j-cassandra, log4j-couchdb and log4j-mongodb. If you are using log4j-nosql, you have to replace that with one of the three new modules while upgrading to 2.10.0. On 2017-11-23 20:03, Ralph

Re: log4j2 properties config?

2017-11-23 Thread Mikael Ståldal
Log4j 2 has properties based configuration (since version 2.4), but it is a different format than Log4j 1.x, not compatible. https://logging.apache.org/log4j/2.x/manual/configuration.html#Properties On 2017-11-23 14:00, Alex O'Ree wrote: Did log4j 2 drop support for the properties based

Re: log4j2.xml won't get read

2017-09-23 Thread Mikael Ståldal
I don't know how Wildfly works, but maybe you should ask this question to any support forum of Wildfly. On 2017-09-19 13:16, Christian Wansart wrote: Hello, I am working on a jax-rs project that uses log4j through slf4j-api and log4j-slf4j-impl. So far, I configured the logging pattern via

Re: Fwd: Add json object to log4j2 when is JSONLayout

2017-08-11 Thread Mikael Ståldal
Note that if we add such option to JsonLayout, then all log messages passed to that layout need to be well-formed JSON, otherwise the output will not be well-formed JSON. We would make it easy for the user to shoot himself in the foot. I think it would be better to create a new subclass of

Re: Desire for a Gitter channel?

2017-07-25 Thread Mikael Ståldal
I would prefer if we could chose one or the other, and not have both at the same time. On 2017-07-24 18:46, Matt Sicker wrote: This link was posted on another mailing list recently in criticism of Slack: https://bitquabit.com/post/i-hate-slack-and-you-should-too/ On 18 July 2017 at 09:12,

Re: Failing to initialize log4j2 configuration dynamically

2017-07-07 Thread Mikael Ståldal
. Ralph On Jul 5, 2017, at 12:18 PM, Mikael Ståldal <mi...@apache.org> wrote: From a JSON standpoint, it would make sense to look up the nodes by name and ignore the order. Should be fairly easy I guess? On 2017-07-05 01:26, Ralph Goers wrote: Like all of our configurations, the JSON

Re: Failing to initialize log4j2 configuration dynamically

2017-07-05 Thread Mikael Ståldal
Configuration implementation, not just JSON. Ralph On Jul 4, 2017, at 2:08 PM, Gary Gregory <garydgreg...@gmail.com> wrote: On Jul 4, 2017 13:50, "Mikael Ståldal" <mi...@apache.org> wrote: This is a bit strange from a JSON standpoint though, since the order of prope

Re: Failing to initialize log4j2 configuration dynamically

2017-07-04 Thread Mikael Ståldal
This is a bit strange from a JSON standpoint though, since the order of properties in a JSON object is not supposed to be significant. On 2017-07-04 19:54, Ralph Goers wrote: This is not a bug but is intentional. Log4j processes configuration files from beginning to end. It does not scan the

Re: Custom Fields in JsonLayout

2017-05-08 Thread Mikael Ståldal
doable? Or shall I come back with a JIRA > ticket+patch? > > Best. > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* mikael.stal...@magine.com Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information ma

Re: Buffering in Console Appender?

2017-04-18 Thread Mikael Ståldal
> > > Cheers, > > > Jaromir > > > > > > -- > > > “Perfection is achieved, not when there is nothing more to add, but > when > > > there is nothing left to take away.” > > > Antoine de Saint Exupéry > > > > > &g

Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Mikael Ståldal
It works to do it like this: gelfBuilder.addComponent(builder.newComponent("KeyValuePair").addAttribute( "key", "foo").addAttribute("value", "bar")); Is there no simpler way to do it? On Wed, Apr 5, 2017 at 2:01 PM, Mikael Ståldal <m

Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Mikael Ståldal
.addAttribute("topic", "testTopic"); > >>kafkaBuilder.add(builder.newLayout("PatternLayout") > >>.addAttribute("pattern", "%d{HH:mm:ss:SSS} | %logger{20} > | > >> %msg%n%ex{5}")); > >> > >>builder.add(kafkaBuilder); >

Re: Can one class log to different files depending on context?

2017-04-03 Thread Mikael Ståldal
A, B, or C. > > Is there a way to construct the logs so that output for Class D winds up > in: log A when referenced from A log B when referenced from B log C when > referenced from C. > > > > > -- > Gerard Gagliano > 505-792-3331 Office > 505-463-3999 Mobile > >

Re: Kafka Appender with Programmatic Configuration

2017-03-31 Thread Mikael Ståldal
https://issues.apache.org/jira/browse/LOG4J2-1860 On Thu, Mar 30, 2017 at 5:27 PM, Matt Sicker <boa...@gmail.com> wrote: > I think so. That'd be less confusing. > > On 30 March 2017 at 02:43, Mikael Ståldal <mikael.stal...@magine.com> > wrote: > > > Woul

Re: Kafka Appender with Programmatic Configuration

2017-03-30 Thread Mikael Ståldal
; > > >> > > >>AppenderComponentBuilder kafkaBuilder = > > >> builder.newAppender("KafkaLogger ", "Kafka") > > >>.addAttribute("topic", "testTopic"); > > >>kafkaBuilder.add(builder.ne

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Mikael Ståldal
But it would be nice to have a simpler way to do that. On Wed, Mar 29, 2017 at 5:28 PM, Mikael Ståldal <mikael.stal...@magine.com> wrote: > Have you tried this: > > kafkaBuilder.addComponent(builder.newComponent("bootstrap.servers", > "Property", "

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Mikael Ståldal
"%d{HH:mm:ss:SSS} | %logger{20} > | > > %msg%n%ex{5}")); > > > > builder.add(kafkaBuilder); > > > > builder.add(builder.newRootLogger(Level.INFO).add( > > builder.newAppenderRef("KafkaLogger"))); > > > > return bui

Re: log4j2 issue

2017-03-17 Thread Mikael Ståldal
--- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV*

Re: Broken downloads

2017-02-13 Thread Mikael Ståldal
gt;> >> - >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >> For additional commands, e-mail: log4j-user-h...@logging.apache.org >> >> > > - > To unsubscribe

Re: Marker and filter

2017-02-08 Thread Mikael Ståldal
I figured out: On Wed, Feb 8, 2017 at 12:28 PM, Mikael Ståldal <mikael.stal...@magine.com> wrote: > How do I configure Log4j to let through log events that (has level WARN or > higher OR (has level INFO AND has a specific marker set))? > > Log

Marker and filter

2017-02-08 Thread Mikael Ståldal
How do I configure Log4j to let through log events that (has level WARN or higher OR (has level INFO AND has a specific marker set))? Log events with level INFO without the marker should not be passed through. -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV

Re: Asynchronous Compression and JVM Shutdown

2017-01-23 Thread Mikael Ståldal
> > What am I missing here? What needs to be the appropriate setup for > having > > > Log4j2 finish its compression actions before its JVM is shut down? Many > > > thanks in advance! > > > > > > Robert > > > > > > -- > > > My GPG

Re: log4j2 - Logger does not have the configuration If procured before LoggerContext has initialized

2016-11-30 Thread Mikael Ståldal
quot;error"); //prints to console > } > > private static ConfigurationSource createConfigurationSource(Properties > cfg) throws IOException { > > ByteArrayOutputStream out = new ByteArrayOutputStream(); > cfg.store(out, null); > InputStream

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

2016-11-17 Thread Mikael Ståldal
-- > > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > > > > > -- > Matt Sicker <boa...@gmail.com> > -- [image: MagineTV] *Mikae

Re: Editable File Log File Permissions

2016-11-14 Thread Mikael Ståldal
> > > > > > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_ > > > > > > > tl?ie=UTF8=1789=9325=1935182021& > > > > > > > linkCode=as2=garygregory-20= > > > > 31ecd1f6b6d1eaf8886ac902a24de4 > > > > &g

Re: porting log4j2 to .NET

2016-10-19 Thread Mikael Ståldal
l not sure why most of > the design for this has to know what runtime/language it's targeting. > >> > >> > >> Thanks, > >> > >> Nick > >> > >> > >> From: Matt Sicker <boa...@gmail.com <

Re: porting log4j2 to .NET

2016-10-18 Thread Mikael Ståldal
va doesn't. You might decide to > > implement > > > some features in .NET using extension methods and in Java you'll have > to > > > pick a different way to implement. Configuration might be another area > > > where there are differences among the different r

Re: porting log4j2 to .NET

2016-10-18 Thread Mikael Ståldal
ent OS's and languages. If I'm trying to pick a logging > framework > > to use and I find a popular one which is capable and runs similarly > across > > the OS's and languages then that's a big plus in my mind. > > > > > > Thanks, > > > > Nick

Re: porting log4j2 to .NET

2016-10-18 Thread Mikael Ståldal
s and languages then that's a big plus in my mind. > > > Thanks, > > Nick > > ____ > From: Mikael Ståldal <mikael.stal...@magine.com> > Sent: Tuesday, October 18, 2016 2:52 AM > To: Log4J Users List > Subject: Re: porting log4j2 t

Re: porting log4j2 to .NET

2016-10-18 Thread Mikael Ståldal
and thus I'm not spending time figuring out design and > algorithms. Would anyone want to venture a guess at what that effort might > be? > > > Thanks, > > Nick > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* mikael.stal...@magine.com G

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-10-17 Thread Mikael Ståldal
Ralph, are you going to work on this issue? On Mon, Oct 17, 2016 at 2:04 PM, Mikael Ståldal <mikael.stal...@magine.com> wrote: > So this issue is triggered by the fact that the Kafka client library we > use itself does logging via SLF4J during initialization. And in this >

Re: Log4j2 Kafka appender NullPointerException when put the related jars in tomcat lib

2016-10-17 Thread Mikael Ståldal
>>> wrote: > >>>>>>>>>> Hi, > >>>>>>>>>> > >>>>>>>>>> When trying out the log4j2 Kafka appender, it works ok if all > the > >>>>>>>>>> log4j2/kafka-clien

Re: Kafka appender expecting String but getting Byte?

2016-08-08 Thread Mikael Ståldal
ger(); > > logger.info("{\"f1\": \"value1\"}"); > > > > I just downloaded the source to log4j2 to see if this will help me > understand what is happening but perhaps this obvious to someone in this > community? > > > > Any pointers would be v

Re: Why is AsyncLogger#shutdown time not configurable?

2016-06-30 Thread Mikael Ståldal
> } > > } > > temp.shutdown(); // busy-spins until all events currently in the > disruptor > > have been processed > > > > > > I was wondering why the "temp.shutdown()" call does not use a > > (configurable) timeout? > > Was this a design

Re: Getter method for retrieving the attributes of an appender from the LoggerContext

2016-01-27 Thread Mikael Ståldal
syslog appender is > connecting to the expected host,port,protocol, etc. > > On Wed, Jan 27, 2016 at 3:19 PM, Mikael Ståldal <mikael.stal...@magine.com > > wrote: > >> It would be useful if Apostolis Giannakidis can explain the use case >> behind this request, now it is a bit ab

Re: Getter method for retrieving the attributes of an appender from the LoggerContext

2016-01-27 Thread Mikael Ståldal
er( "syslogAppender", > > >> "Syslog" ) > > >>>>>>>>>>> .addAttribute( "protocol", "TCP" ) > > >>>>>>>>>>> .addAttribute( "ho

Re: Getter method for retrieving the attributes of an appender from the LoggerContext

2016-01-27 Thread Mikael Ståldal
eated. We would have to keep it around for this to work. > Furthermore, each component would need to have a reference to its > corresponding node, which we obviously don't currently do. > > Ralph > > > On Jan 27, 2016, at 2:33 AM, Mikael Ståldal <mikael.stal...@magine.com> &g

Re: Getter method for retrieving the attributes of an appender from the LoggerContext

2016-01-27 Thread Mikael Ståldal
config files (and the config builder classes). We get questions every so > often about modifying the config programmatically which would either need > to maintain more Nodes or just be unsupported. > > On 27 January 2016 at 09:09, Mikael Ståldal <mikael.stal...@magine.com> > wrote: > > &

Re: Appender's append() method

2016-01-14 Thread Mikael Ståldal
always throw an exception in the catch block instead of > checking the state of the ignoreExceptions flag? > > > > Thanks, > > Nick > > > > > > ----- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-m

Re: Appender's append() method

2016-01-14 Thread Mikael Ståldal
t;> > >>>> > >>>> - > >>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > >>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org > >>>> > >>>> > >>> > >>> > >>> -- &

Re: Does anyone use Log4j2 with Logstash?

2015-11-25 Thread Mikael Ståldal
Yes probably. But it is still a network request to a remote server. On Wed, Nov 25, 2015 at 4:07 PM, Matt Sicker <boa...@gmail.com> wrote: > Isn't Kafka like a lot faster than HTTP? > > On 25 November 2015 at 02:47, Mikael Ståldal <mikael.stal...@magine.com> >

Re: Does anyone use Log4j2 with Logstash?

2015-11-24 Thread Mikael Ståldal
be in a new > > >> > log4j-amazon module or in the core module? Does it fit in no-sql? > > >> > > > >> > Gary > > >> > On Nov 19, 2015 6:29 AM, "Matt Sicker" <boa...@gmail.com> wrote: > > >> > >

Re: StatusLogger

2015-11-23 Thread Mikael Ståldal
status" attribute controls the level. Can I set the appender for the > StatusLogger? > > >>> > > >>> Thanks, > > >>> Nick > > >>> > > >> > > >> > > >> > > >> ---

Re: Does anyone use Log4j2 with Logstash?

2015-11-19 Thread Mikael Ståldal
ssages to an ELK stack, but I was > wondering > > if there were other ways of doing this. > > > > -- > > Matt Sicker <boa...@gmail.com> > > > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* mikael.stal...@magine.com Grev Turegatan 3 | 1

Re: Does anyone use Log4j2 with Logstash?

2015-11-19 Thread Mikael Ståldal
ElasticSearch is not Amazon specific (even though they provide it as a service), so I don't think it should be in an amazon module. You can run ElasticSearch yourself without Amazon.

Re: Does anyone use Log4j2 with Logstash?

2015-11-19 Thread Mikael Ståldal
just "E-K")? Can we develop an ElasticSearchAppender for Log4j 2? On Thu, Nov 19, 2015 at 1:07 PM, Mikael Ståldal <mikael.stal...@magine.com> wrote: > Is is even necessary to add Logstash to the mix? I think that Log4j 2 > should be able to whatever is necessary by itsel

Re: Bizarre performance in log4j2

2015-10-13 Thread Mikael Ståldal
t; >>>>>> class=org.apache.logging.log4j.core.config.LoggersPlugin]. Searching > >>>> for > >>>>>> factory method... > >>>>>> 2015-10-12 18:55:25,565 DEBUG Found factory method [createLoggers]: > >>>>> public > >>&

Re: markers

2015-09-17 Thread Mikael Ståldal
platforms. > That > > being said, I'm surprised at how different log4net is from log4j(2). It > > appears log4net doesn't support markers. While we don't have to have the > > same solution for both platforms, it would be nice if the solutions were > > the same or similar. >

Re: approach for defining loggers

2015-09-09 Thread Mikael Ståldal
to turn on/off logging from those different > sections of > > > code independently. I think the current configuration includes all the > > > loggers. Normally I would expect there to be many, on the order of > 10's or > > > 100's, loggers within an application. Howeve

Re: approach for defining loggers

2015-09-02 Thread Mikael Ståldal
ndependently. I think the current configuration includes > > > all the > > > > > > > loggers. Normally I would expect there to be many, on the > order of > > > > > 10's or > > > > > > > 100's, loggers within an application. However, i

Re: redefining existing levels?

2015-08-27 Thread Mikael Ståldal
-user-h...@logging.apache.org -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you

Re: java.lang.NoSuchFieldError: errorHandler

2015-08-14 Thread Mikael Ståldal
)); appender.setHeader(true); appender.setFacility(facility); LOG.addAppender(appender); } } -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged

Re: java.lang.NoSuchFieldError: errorHandler

2015-08-14 Thread Mikael Ståldal
effort to persuade others in joining you when you have not really improved things ;-). I was writing some longer email I guess, I will send it later, I guess. Bye. Op 14-8-2015 om 10:27 schreef Mikael Ståldal: Perhaps the Log4j developers should spend some time to persuade other Apache

Re: my results thus far

2015-08-12 Thread Mikael Ståldal
- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV

Re: FATAL Unable to register shutdown hook because JVM is shutting down.

2015-08-03 Thread Mikael Ståldal
This is not a web application. On Thu, Jul 16, 2015 at 11:10 AM, Adam Retter adam.ret...@googlemail.com wrote: Are you using log4j in a web application? If so if you google around you can find several suggestions for solving this behaviour. On 16 July 2015 at 09:49, Mikael Ståldal

Re: FATAL Unable to register shutdown hook because JVM is shutting down.

2015-07-22 Thread Mikael Ståldal
false here? The default for LogManager seems to be true... Remko Sent from my iPhone On 2015/07/21, at 22:58, Mikael Ståldal mikael.stal...@magine.com wrote: AbstractLoggerAdapter.java:102 - To unsubscribe, e

Re: FATAL Unable to register shutdown hook because JVM is shutting down.

2015-07-21 Thread Mikael Ståldal
and continued to work. (The stack trace was generated from a try/catch block.) If this error report is annoying, a workaround may be to change to your app to start logging at startup. Remko On Mon, Jul 20, 2015 at 6:25 PM, Mikael Ståldal mikael.stal...@magine.com wrote: 2015-07-20 11:23:31,741

Re: FATAL Unable to register shutdown hook because JVM is shutting down.

2015-07-21 Thread Mikael Ståldal
from my iPhone On 2015/07/21, at 17:18, Mikael Ståldal mikael.stal...@magine.com wrote: The app do some logging at startup as well, and quite some logging in between. However, it is a short running batch job, and in this case the JVM only runs for 6 seconds in total. See below to get

Re: HipChat Appender

2015-06-11 Thread Mikael Ståldal
-- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated

Re: Log4j 2 plugin in Scala

2015-05-29 Thread Mikael Ståldal
plugins via Class.forName(). This is question is not unique to Log4j as it does not know of anything else but the JRE and third party jars. I imagine the Scala code would have to make allowances for being instantiated from a POJO... Gary On Tue, Apr 7, 2015 at 8:38 AM, Mikael Ståldal

Re: ThreadContext vs asynchronous app

2015-05-21 Thread Mikael Ståldal
: Mikael, Any thoughts on how to get this to work for you? Feel free to dig into the code, we are always looking new for contributors :-) Gary On Mon, May 18, 2015 at 10:25 AM, Mikael Ståldal mikael.stal...@magine.com wrote: No, not really. There is some discussion on this JIRA issue

Errors when using XMLLayout

2015-05-21 Thread Mikael Ståldal
(AbstractLogger.java:700) at org.apache.logging.slf4j.Log4jLogger.info(Log4jLogger.java:178) -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged

Re: Translating log levels

2015-05-20 Thread Mikael Ståldal
you the output. You can use the RewriteAppender to modify the Level to what you want. Ralph On May 19, 2015, at 8:10 AM, Mikael Ståldal mikael.stal...@magine.com wrote: Is it possible to translate log levels in the configuration. I have some 3rd party libraries who log stuff on too

Re: Translating log levels

2015-05-20 Thread Mikael Ståldal
I created a JIRA issue for this: https://issues.apache.org/jira/browse/LOG4J2-1023 On Wed, May 20, 2015 at 10:09 AM, Mikael Ståldal mikael.stal...@magine.com wrote: It seems like I would have to implement a custom RewitePolicy to accomplish this, none of the two bundled RewritePolicies can do

Translating log levels

2015-05-19 Thread Mikael Ståldal
Is it possible to translate log levels in the configuration. I have some 3rd party libraries who log stuff on too high level, so I would need a way to say that logging from com.somecompany.funlibrary on level ERROR should be translated to WARN. -- [image: MagineTV] *Mikael Ståldal* Senior

Re: ThreadContext vs asynchronous app

2015-05-18 Thread Mikael Ståldal
on this? Gary On Fri, May 8, 2015 at 1:51 AM, Mikael Ståldal mikael.stal...@magine.com wrote: I have an asynchronous web app (in Scala based on Twitter Finagle, not using Servlet API). I use Log4j 2.2 for logging, and I want to tag log messages with some information about requests

XMLLayout dependencies

2015-05-11 Thread Mikael Ståldal
Which library dependencies do I need to use the XMLLayout? Is this documented somewhere? -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential

ThreadContext vs asynchronous app

2015-05-08 Thread Mikael Ståldal
Log4j's TheradContext for this, but it doesn't work in Finagle's asynchronous environment since there is no correlation between threads and requests. How can I do this? -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25

Incorrectly defined compressionType parameter to GelfLayout

2015-05-06 Thread Mikael Ståldal
I think there is a bug in GelfLayout. The compressionType parameter does not work, and I can see why in the source: @PluginAttribute(value = compressionThreshold, defaultString = GZIP) final CompressionType compressionType, The value is wrong here. -- [image: MagineTV] *Mikael Ståldal

Re: adding log4j 2.x support to a library

2015-04-30 Thread Mikael Ståldal
/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged

Log4j 2 plugin in Scala

2015-04-07 Thread Mikael Ståldal
Is it possible to write a Log4j 2 plugin in Scala? Using Log4j 2.2. -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may

Strage warning about MessageFactory mismatch

2015-03-23 Thread Mikael Ståldal
. -- [image: MagineTV] *Mikael Ståldal* Senior backend developer *Magine TV* mikael.stal...@magine.com Regeringsgatan 25 | 111 53 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated

Re: [ANNOUNCEMENT] Apache Log4j 2.1 released

2014-10-28 Thread Mikael Ståldal
/ - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal

Re: [survey] What version of Java do you use?

2014-09-10 Thread Mikael Ståldal
-- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal...@appearnetworks.com

Re: Log4j 2.x Web app initialization logging

2014-09-05 Thread Mikael Ståldal
Nice. On Thu, Sep 4, 2014 at 8:32 PM, Matt Sicker boa...@gmail.com wrote: I've fixed this in the master branch. On 4 September 2014 11:24, Mikael Ståldal mikael.stal...@appearnetworks.com wrote: I think it makes sense to log to ServletContext.log() if something goes wrong

Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Mikael Ståldal
in Log4jServletContextListener ;-) G On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal mikael.stal...@appearnetworks.com wrote: Log4jServletContainerInitializer, Log4jServletContextListener, Log4jServletFilter and Log4jWebInitializerImpl log some stuff using ServletContext.log() at startup and shutdown

Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Mikael Ståldal
if some condition is met? Like the status logger level set to DEBUG? Gary On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal mikael.stal...@appearnetworks.com wrote: Log4jServletContainerInitializer, Log4jServletContextListener, Log4jServletFilter and Log4jWebInitializerImpl log some stuff

Log4j 2, ThreadContext and asynchronous servlets

2014-08-20 Thread Mikael Ståldal
Is it possible to have the ThreadContext in Log4j 2 to be request scoped with asynchronous servlets in a Servlet 3 environment? With asynchronous servlets, there is no direct connection between request and thread. -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email

Re: Set the file name based on command line args

2014-08-08 Thread Mikael Ståldal
/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory -- Mikael Ståldal Chief Software Architect *Appear

Log4j 2.x to GELF

2014-08-05 Thread Mikael Ståldal
Are there any plugins (Appender or Layout) for Log4j 2.x to produce GELF ( http://graylog2.org/gelf)? I found a few, but only for Log4j 1.x. -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal...@appearnetworks.com

Re: Log4j 2.x to GELF

2014-08-05 Thread Mikael Ståldal
/divdivSubject: Re: Log4j 2.x to GELF /divdiv /divThere is nothing yet at the moment, but contributions are always welcome! Best regards, Remko On Tue, Aug 5, 2014 at 9:04 PM, Mikael Ståldal mikael.stal...@appearnetworks.com wrote: Are there any plugins (Appender or Layout) for Log4j 2.x

Re: Log4j 2.x to GELF

2014-08-05 Thread Mikael Ståldal
at 11:27 AM, Mikael Ståldal mikael.stal...@appearnetworks.com wrote: I have made a GELFLayout, I have attached it to the JIRA issue. On Tue, Aug 5, 2014 at 2:52 PM, Remko Popma remko.po...@gmail.com wrote: Oh really? That could be, I confess that I did not search JIRA before

Re: Logstash Log4J2

2014-05-19 Thread Mikael Ståldal
on this? Can I make socket appender behave like 1.x? cheers -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal...@appearnetworks.com

Log4j 2 appender for Redis?

2014-04-30 Thread Mikael Ståldal
Are there any appender for Redis for Log4j 2? -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal...@appearnetworks.com

Configure Log4j 2.0 in a Web Application

2014-04-25 Thread Mikael Ståldal
file. Is that possible with Log4j 2.0? I am currently using Jetty 9.x as application server, but I would like a solution which can be used in multiple application servers. -- Mikael Ståldal Chief Software Architect *Appear* Phone: +46 8 545 91 572 Email: mikael.stal...@appearnetworks.com

Re: Different levels to different appenders

2008-03-03 Thread Mikael Ståldal
Mikael Ståldal skrev: then set the logger levels for both hierarchies to DEBUG, and write yourself a simple custom Filter implementation that accepts/denies events based on your logic, and attach a separate configured instance of that filter to each of the appenders (accepting/denying

Re: Different levels to different appenders

2008-02-27 Thread Mikael Ståldal
Paul Smith skrev: Why not simply have all the events your interested in together, in context, in one log file? Have one File appender, and tweak the levels to emit/silence loggers you care/don't care about? I'm personally not sure of the advantage of seeking information across 2 log files.

Re: Different levels to different appenders

2008-02-26 Thread Mikael Ståldal
Paul Smith skrev: If this truly is what you want, Are you implying that it would be a bad idea? Why would it be a bad idea? then set the logger levels for both hierarchies to DEBUG, and write yourself a simple custom Filter implementation that accepts/denies events based on your logic, and

Re: Different levels to different appenders

2008-02-25 Thread Mikael Ståldal
Jim Reilly skrev: I think your main problem here is that you cannot put the same logger name =xxx and have that xxx be the same string, to be able to seperate by logging level. I am aware of that problem. Now I need a solution. I think your only way would be to have multiple appenders that

Different levels to different appenders

2008-02-21 Thread Mikael Ståldal
I have two appenders, MAIN_LOG and DEBUG_LOG. I have the loggers set up to match Java class hierarchy as recommended. I have two interesting codebases, com.mycompany and com.othercompany. I want to send DEBUG and higher from com.mycompany and WARN and higher from com.othercompany to MAIN_LOG.

Re: How do I configure Log4J to send different levels to different appenders

2007-07-05 Thread Mikael Ståldal
Curt Arnold wrote: Set root threshold to debug, attach both appenders to root. Write custom filters for your rules and attach the filters to the appenders. By custom filter, do you mean writing my own Java class implementing org.apache.log4j.spi.Filter? Is it really not possible to

  1   2   >