Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-14068

Allow configuring of log message formatting verbosity

    Details

    • Type: Improvement
    • Status: In Progress
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: log
    • Team:
      Architecture

      Description

      There are currently two settings for how much information is included in each log message, the default (which doesn't include the time), and --longlog (which includes the time and the filename and line number that emitted it, and what look to always be some empty parentheses).

      It would be useful to have either a "mediumlog" configuration (that includes the time, but not filename), and/or to allow the user to configure the log message formatting with a command line option to specify a log config override file.

        Attachments

          Issue Links

            Activity

            Hide
            ktl Kian-Tat Lim added a comment -

            Added --logconfig OVERRIDE to allow an override file to be appended (appending means that the ConversionPattern can easily be changed without affecting the rest). Also, while in there, added --logdest FILE to allow output to go to a file. (This also can accept System.err as an undocumented value to direct logs to stderr.) Finally, fixed the --longlog time format to use a 24 hour clock and append the timezone; it appears difficult to force UTC, unfortunately.

            Show
            ktl Kian-Tat Lim added a comment - Added --logconfig OVERRIDE to allow an override file to be appended (appending means that the ConversionPattern can easily be changed without affecting the rest). Also, while in there, added --logdest FILE to allow output to go to a file. (This also can accept System.err as an undocumented value to direct logs to stderr .) Finally, fixed the --longlog time format to use a 24 hour clock and append the timezone; it appears difficult to force UTC, unfortunately.
            Hide
            ktl Kian-Tat Lim added a comment -

            Darn; the new configuration code in the argument parser actually overrides --loglevel. Back to the drawing board...

            Show
            ktl Kian-Tat Lim added a comment - Darn; the new configuration code in the argument parser actually overrides --loglevel . Back to the drawing board...
            Hide
            gkovacs Gabor Kovacs added a comment - - edited

            --longlog still seems to override loglevel to INFO even if --loglevel DEBUG is given on the command line. Similar note earlier in DM-7459.  (There is a confusing side effect that the python logger log level remains at DEBUG, so 3rd party libraries e.g. matplotlib still emit DEBUG messages while the ones through lsst.log are suppressed.)

            Show
            gkovacs Gabor Kovacs added a comment - - edited --longlog still seems to override loglevel to INFO even if --loglevel DEBUG is given on the command line. Similar note earlier in DM-7459 .  (There is a confusing side effect that the python logger log level remains at DEBUG, so 3rd party libraries e.g. matplotlib still emit DEBUG messages while the ones through lsst.log are suppressed.)

              People

              • Assignee:
                ktl Kian-Tat Lim
                Reporter:
                Parejkoj John Parejko
                Watchers:
                Gabor Kovacs, Hsin-Fang Chiang, John Parejko, Kian-Tat Lim, Paul Price, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel