Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-7693

Improvement to log output for high level audit to make it more useful to developers

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 3.4.4
    • Fix Version/s: 3.4.5
    • Component/s: Installer
    • Labels:
      None
    • Bug Priority:
      Category 4

      Description

      The log output from the high level audit function (AccessAuditor) is a good aid for developers looking into problems that involve
      a sequence of method calls within a single transaction. However the current 'debug' output includes a) 'summary' lines that are only
      useful to audit applications, b) each audited event results in two blocks of output (1. the audit records, 2. inbound data used to
      create the audit data) and c) the sub-actions are in the middle of the inbound data as it is sorted in alphabetical order.

      Improvement: Change output so that a) summary lines are not logged when trace (rather than debug) is enabled. b) only the
      inbound data (the more complete set) is logged when trace is turned on and c) the sub-actions are appended on the end of
      the logged inbound data for both trace and debug levels.

      • Enable debug from AccessAuditor by adding the following to <tomcat>\shared\classes\alfresco\extension\dev-log4j.properties
        log4j.appender.File.Threshold=debug
        log4j.logger.org.alfresco.repo.audit.access.AccessAuditor=debug
      • Enable high level audit by adding the following to <tomcat>\shared\classes\alfresco-global.properties and restarting.
        audit.alfresco-access.enabled=true
        audit.alfresco-access.sub-actions.enabled=true
      • Restart alfresco
      • In Share perform actions that are audited (such as creating a new version of a document or adding an aspect) and check the log file.
        The log lines
        /alfresco-access/transaction/type=...
        /alfresco-access/transaction/user=...
        /alfresco-access/transaction/version-properties=...
        /alfresco-access/transaction/version-properties/versionType=...
        should no longer appear after the lines that start:
        /alfresco-access/transaction/sub-action/...

      There should still be two sections in debug mode with the following titles:
      Audit data:
      ...
      Inbound audit values:
      ...

      • Change the log levels to trace:
        log4j.appender.File.Threshold=trace
        log4j.logger.org.alfresco.repo.audit.access.AccessAuditor=trace
      • Restart alfresco
      • In Share perform actions that are audited (such as creating a new version of a document or adding an aspect) and check the log file.
        The two titles should no longer exist. Only the lines from the second section should exist.
        There should be no summary lines (which repeat the individual line values) for properties and aspects. These lines started with
        /alfresco-access/transaction/properties/add={...
        /alfresco-access/transaction/properties/delete={...
        /alfresco-access/transaction/properties/from={...
        /alfresco-access/transaction/properties/to={...
        /alfresco-access/transaction/aspects/add={...
        /alfresco-access/transaction/aspects/delete={...

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs (Inactive)
                Reporter:
                adavis Alan Davis
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel