Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-784

Add date in the default Karaf log

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.2.3, 3.0.0
    • Component/s: karaf
    • Labels:
      None

      Description

      The default log pattern used in Karaf for the out file (karaf.log) is:

      %d

      {ABSOLUTE}

      | %-5.5p | %-16.16t | %-32.32c

      {1} | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n

      It means that a log line looks like:

      16:36:51,285 | INFO | Thread-6 | FeaturesServiceImpl

      As Karaf is a container, and is up for a "long" time, it makes sense to add the date in the log. The log line will looks like:

      2011-07-27 16:49:16,557 | INFO | Thread-4 | FeaturesServiceImpl |

      I propose to use the following pattern (at least in the karaf.log file):

      %d{yyyy-MM-dd HH:mm:ss,SSS} | %-5.5p | %-16.16t | %-32.32c{1}

      | %-32.32C %4L | %X

      {bundle.id}

      - %X

      {bundle.name}

      - %X

      {bundle.version}

      | %m%n

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              jbonofre Jean-Baptiste Onofré
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: