Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-829

Serialization improvement

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 1.0.12
    • 1.0.11
    • logback-core
    • None

    Description

      ch.qos.logback.classic.Logger has several transient fields, but parent and childrenList are not.

      This means that when serializing a logger, all logger instances will be serialized. This is not necessary since Logger implements readResolve, that only depends on the name.

      Suggestion for fix, mark all field in Logger as transient, except name.

      In our application, the reduction in size of a serialized object (referencing a logger instance) was dramatic. It went from about 27 kb to 5 kb.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            stoyle Alf Kristian Støyle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: