You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Tal Liron (JIRA)" <ji...@apache.org> on 2014/01/02 14:28:50 UTC

[jira] [Comment Edited] (LOG4J2-476) Add source host to log event for distributed logging

    [ https://issues.apache.org/jira/browse/LOG4J2-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860201#comment-13860201 ] 

Tal Liron edited comment on LOG4J2-476 at 1/2/14 1:27 PM:
----------------------------------------------------------

Please bear with me as I try to verify this...

So, I followed the instructions and created a RewriteAppender that references a MongoDB Appender. However, the key-value pairs that I add do not appear in the MongoDB log object. Is there something else that I'm missing?

Looking at the MapRewritePolicy source, it seems that it expects a MapMessage. How do I force all loggers to do that?


was (Author: emblemparade):
Please bear with me as I try to verify this...

So, I followed the instructions and created a RewriteAppender that references a MongoDB Appender. However, the key-value pairs that I add do not appear in the MongoDB log object. Is there something else that I'm missing?

> Add source host to log event for distributed logging
> ----------------------------------------------------
>
>                 Key: LOG4J2-476
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-476
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0-beta9
>            Reporter: Tal Liron
>            Priority: Critical
>
> It's absolutely necessary to support this: when logging centrally, you *need* to know from where the log message arrived. I've marked the issue as critical, because log4j is not very useful without it in distributed environments. If you don't know where the log message came from, it's close to worthless.
> This applies at least to all classes that inherit from AbstractDatabaseAppender, but I think the solution should be more generic: developers might create their own appenders that would require this information. It can be handled, I think, in the same way as LogEvent.setIncludeLocation: allow all loggers to include this information if configured to do so.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org