Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-4902

Log markers filter some messages pathologically

    XMLWordPrintableJSON

Details

    Description

      Many logging calls across all log levels are marked with o.a.g.internal.logging.log4j.LogMarker markers for selective enabling and debugging. All these markers have a parent marker GEODE_VERBOSE. However, per the default given in geode-core/src/main/resources/log4j2.xml, this parent marker is set to filter log messages.

      Many of these log messages are invoked at the info level, suggesting an expectation that the message would be seen.

      These markers should be refactored to (a) include by default markers that commonly or exclusively appear in coarse-grained logging levels, and (b) to reorganize the markers' parent/child relationships so that they are not blanket-disabled by default. Only those markers attacked to more verbose logging should be disabled by default.

      Additionally, the log classes FastLogger and LogWriterLogger are themselves slightly pathological. Notably, the former overrides some isEnabled aliases but leaves exposed default many of the root method signatures. The latter pathologically includes a reference to itself as a field unto itself in the lines:

      private final ExtendedLoggerWrapper logWrapper;
      // ...
      
        private LogWriterLogger(final Logger logger, final String connectionName,
            final boolean isSecure) {
          super((AbstractLogger) logger, logger.getName(), logger.getMessageFactory());
          this.logWrapper = this;
          // ...
        }
      

      These classes could use refactoring in their own right, perhaps as a separate child ticket.

      ---------

      Docs: While only the top-level marker (formerly GEMFIRE_VERBOSE, now GEODE_VERBOSE) is documented, it may be worth a release note that the Log4J2 markers have changed, and anyone be using a custom log4j2.xml after discovering these markers will have to update that XML to the new markers.

      Attachments

        Issue Links

          Activity

            People

              prhomberg Patrick Rhomberg
              prhomberg Patrick Rhomberg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m