You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Andrei Ivanov (JIRA)" <ji...@apache.org> on 2019/04/02 11:57:04 UTC

[jira] [Updated] (LOG4J2-2579) Don't normalize event names

     [ https://issues.apache.org/jira/browse/LOG4J2-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Ivanov updated LOG4J2-2579:
----------------------------------
    Flags: Patch

> Don't normalize event names
> ---------------------------
>
>                 Key: LOG4J2-2579
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2579
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Log4j-Audit
>    Affects Versions: Log4j-Audit 1.0.1
>            Reporter: Andrei Ivanov
>            Priority: Major
>
> I've realized that it's a bit weird that event names are forcefully normalized so I propose to remove this.
> There are 2 ways to obtain/log an audit event:
> 1. {{org.apache.logging.log4j.audit.LogEventFactory#getEvent(Class<T> intrface)}}, which accepts a Java interface and uses the simple name of that interface as the event name
> 2. {{org.apache.logging.log4j.audit.AuditLogger#logEvent(String eventName, Map<String, String> attributes)}}, which allows setting the event name as {{String}}, and that name gets checked against the {{CatalogManager}}
> I'm thinking that the normalization might have started as a way to make the name obtained in the 1st case, as the 2nd case has maximum freedom to define the event name to start with or without an upper case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)