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

Improve the default log configuration

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: log
    • Labels:
    • Story Points:
      3
    • Sprint:
      DB_F16_10
    • Team:
      Data Access and Database

      Description

      When log/log4cxx is not configured, it uses the default configuration which is at DEBUG level. Right now log is configured explicitly when running CmdLineTasks or python unit tests, but the stack is also used outside of the Task environment or utils unit tests environments. It should have a more friendly and useful default level and pattern, without the user having to do anything.

        Attachments

          Issue Links

            Activity

            Hide
            salnikov Andy Salnikov added a comment -

            Hsin-Fang Chiang, could you review my changes when you have a minute, absolutely no rush. Thanks!

            Show
            salnikov Andy Salnikov added a comment - Hsin-Fang Chiang , could you review my changes when you have a minute, absolutely no rush. Thanks!
            Hide
            rhl Robert Lupton added a comment -

            I agree that accepting the old-default for now and filing an RFC is the right course; it's RFC-245

            Show
            rhl Robert Lupton added a comment - I agree that accepting the old-default for now and filing an RFC is the right course; it's RFC-245
            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            Looks good to me.

            Note that the old default from pex_logging was standard error (but I'm neutral to either). That was why I explicilty configured here as a lsst_dm_stack_demo script relies on it.

            Show
            hchiang2 Hsin-Fang Chiang added a comment - Looks good to me. Note that the old default from pex_logging was standard error (but I'm neutral to either). That was why I explicilty configured here as a lsst_dm_stack_demo script relies on it.
            Hide
            salnikov Andy Salnikov added a comment -

            Thanks for review! I patched all issues, merged and done.

            Show
            salnikov Andy Salnikov added a comment - Thanks for review! I patched all issues, merged and done.
            Hide
            salnikov Andy Salnikov added a comment -

            One last comment regarding logging destination - I indeed decided to use standard output which is a default for LOG4CXX console appender, this is different from pex_logging and standard Python logging which both log to standard error. I actually do not like any of those options, for me most natural would be to log warnings and errors to stderr but info/debug/trace to stdout. Maybe we should implement special appender which does that but that is certainly for separate RFC.

            Show
            salnikov Andy Salnikov added a comment - One last comment regarding logging destination - I indeed decided to use standard output which is a default for LOG4CXX console appender, this is different from pex_logging and standard Python logging which both log to standard error. I actually do not like any of those options, for me most natural would be to log warnings and errors to stderr but info/debug/trace to stdout. Maybe we should implement special appender which does that but that is certainly for separate RFC.

              People

              Assignee:
              salnikov Andy Salnikov
              Reporter:
              hchiang2 Hsin-Fang Chiang
              Reviewers:
              Hsin-Fang Chiang
              Watchers:
              Andy Salnikov, Fritz Mueller, Hsin-Fang Chiang, Kian-Tat Lim, Paul Price, Robert Lupton, Russell Owen
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.