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/05/27 16:44:00 UTC

[jira] [Closed] (LOG4J2-2579) Fix event names normalization

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

Andrei Ivanov closed LOG4J2-2579.
---------------------------------
    Resolution: Fixed

Thanks for the help!

> Fix event names normalization
> -----------------------------
>
>                 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
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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 more friendly (or maybe there are some other rules to apply regarding event names, from the parent project?), 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)