Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1147

KNOX Audit Log time not configurable or not supporting TZ

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10.0, 0.13.0, 0.14.0
    • None
    • None

    Description

      The KNOX Log4J configuration for Knoxaudit log uses or.hadoop.gateway.audit.log4j.layout.AuditLayout , so when the system is using PST tz , The auditLog is logging with 1hr ahead of current PST time. Is there a way to log audit event matching with current time in system and not break with DST change?

      Even in latest version it is having hardcoded time pattern , not able to add Time zone. Was thinking of adding
      setDateFormat(DATE_FORMAT, TimeZone.getTimeZone(TZ)); But is there any other better way to get around this issue?

      +++++
      public class AuditLayout extends DateLayout {

      private static final String DATE_FORMAT = "yy/MM/dd HH:mm:ss";
      private static final String SEPARATOR = "|";
      private StringBuffer sb = new StringBuffer();
      Override
      public void activateOptions()

      { setDateFormat( DATE_FORMAT ); }

      +++++

      Thanks

      Attachments

        1. KNOX-1147.patch
          2 kB
          Rajesh Chandramohan

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rajeshhadoop Rajesh Chandramohan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: