Hi Remko,
Thank you very much for the explanation.
That was exactly what I needed.
I think it is better if those information can be included the log4j2
documentation in the migrating from log4j 1.2 section because most of the
applications are still using log4j 1.2.x and need to convert to log4j2.
Thanks for the additional detail.
With log4j-1.x, a custom appender may have been the best solution, but it
sounds like log4j2's built-in features provide all you need.
If your application calls
ThreadContext.put("serviceId", getServiceId());
ThreadContext.put("serviceName", getServiceName());
Hi All,
Thank you for the replies.
Currently I'm migrating a large application from log4j 1.2.17 to log4j 2.2.
That application has custom console appender which takes logging event and
create custom logging events with some additional application specific data
such as service id, service name etc
You may not need to write a custom appender. Have you looked at the
ThreadContext map? Your application threads can put key-value pairs in that
map, and following that, all log events generated by that thread will carry
those key-value pairs. You can output the values with the %X pattern in your
I have a feeling that with a bit of proper class and logger hierarchy
you can utilize the current facilities in Apache Log4j 2 at
https://logging.apache.org/log4j/2.0/manual/api.html
which requires you to have appropriate log message formats and
then feed them with you application specific data.
[
https://issues.apache.org/jira/browse/LOG4J2-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14532935#comment-14532935
]
Robert Schaft commented on LOG4J2-435:
--
>From my point of view a date pattern {{%d}}
Hi Beharooz,
I want to log some application specific data such as domain, userid etc
using custom console appender.
Is this possible ?
Thanks!
On Thu, May 7, 2015 at 5:20 PM, Behrooz Nobakht wrote:
> Hi,
>
> What is the customization that you wanna apply?
>
> Cheers,
> Behrooz
>
>
> On Thu, Ma
[
https://issues.apache.org/jira/browse/LOG4J2-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Wehner updated LOG4J2-945:
-
Attachment: StatusLoggerBenchmark.java
log4j2-status-perf.xml
> Reconfiguring stat
[
https://issues.apache.org/jira/browse/LOG4J2-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14532571#comment-14532571
]
Stefan Wehner commented on LOG4J2-945:
--
Hey,
I'm not sure how to test this exactly -
Hi,
What is the customization that you wanna apply?
Cheers,
Behrooz
On Thu, May 7, 2015 at 1:26 PM, Chathura Priyankara wrote:
> Hi devs,
>
> I want to create a custom console appender for log4j2 but I cannot find
> any resource or sample about this. The only resource [1] is not enough for
>
Hi devs,
I want to create a custom console appender for log4j2 but I cannot find any
resource or sample about this. The only resource [1] is not enough for this.
[1] https://logging.apache.org/log4j/2.x/manual/extending.html#Appenders
Can anyone provide me a sample for this ? (both configuration
[
https://issues.apache.org/jira/browse/LOG4J2-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14532340#comment-14532340
]
Jens Granseuer commented on LOG4J2-888:
---
The same issue also crops up if you specify
12 matches
Mail list logo