Customizing Viewpoint > Customizing the Viewpoint log output format

3.8 Customizing the Viewpoint log output format

To configure a custom log output

  1. Open the log4j.xml file located in the Viewpoint home directory.
  2. Locate the <logger> element for the desired category.
  3. Inside of the layout element, modify the conversion <param> value to follow the preferred format by using the following rules:
    1. Arrange the date elements according to your preferences (they are in {} brackets and preceded by %d). You may separate them with symbols (commas, colons, etc.).
    2. ElementDescription
      ddDay
      MMMMonth
      yyyyYear
      HHHours
      mmMinutes
      ssSeconds
    3. % sets off a new element of the output. The possible elements are:
    4. ElementDescription
      %dDate and time
      %5pVerbosity level associated with the entry
      %c{1}ID of the location where the action or error is occuring
      %LPort number
      %mReported action
      %nOutput
  4. Spaces and symbols may be used to format the output. For example:

    <param name="ConversionPattern" value="%d{dd MMM yyyy HH:mm:ss,SSS} %5p %c{1}:%L - %m%n" />

    The log output follows the format of [date] [verbosity level] [ID of the action's location]:[port number] - [action][output]

Related topics