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

Ajay Kumar commented on HDDS-198:
---------------------------------

[~dineshchitlangia] thanks for working on this important functionality. Overall 
patch LGTM. Few comments:
 * AuditLogger
 ** Change default logging level from All to INFO
 ** We can wrap SUCCESS and FAILURE in a inner ENUM as well.
 * package-info
 ** L48-49: simplify
{code:java}
This interface must be implemented by entities whose members will need to be 
logged in the audits.{code}
to
{code:java}
This interface must be implemented by entities requiring audit logging. {code}
L109: typo "log4j3"

 * TestAuditLogger
 ** There are bunch of {{stackTrace}} (L55,124) and {{System.out.println}} 
statements, we can replace them with sl4j logger.
 ** L51 Replace {{file.delete()}} with \{{ 
FileUtils.deleteQuietly(file.delete())}}.
 ** L38 AUDIT is not static,final; checkstyle will probably flag it for 
camelcase.
 ** L43 rename tearUp to setup. (just a convention i guess)
 ** L23,27,30 unused imports.
 ** There is TestAuditLogger class in Hdfs as well, shall we rename this one to 
TestOzoneAuditLogger or TestHddsAuditLogger to avoid confusion.
 * DummyAction and OMAction looks pretty identicle. Either we can use OMAction 
for test cases as well or just extend it in inner class inside related 
TestClass.

> Create AuditLogger mechanism to be used by OM, SCM and Datanode
> ---------------------------------------------------------------
>
>                 Key: HDDS-198
>                 URL: https://issues.apache.org/jira/browse/HDDS-198
>             Project: Hadoop Distributed Data Store
>          Issue Type: New Feature
>            Reporter: Dinesh Chitlangia
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: audit, log4j2
>             Fix For: 0.2.1
>
>         Attachments: HDDS-198.001.patch, HDDS-198.002.patch, 
> HDDS-198.003.patch
>
>
> This Jira tracks the work to create a custom AuditLogger which can be used by 
> OM, SCM, Datanode for auditing read/write events.
> The AuditLogger will be designed using log4j2 and leveraging the MarkerFilter 
> approach to be able to turn on/off audit of read/write events by simply 
> changing the log config.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to