Skip to content

Logging

The Easit GO connector for Jira uses Log4j for logging, Log4j is a logging framework that provides a lot of configuration options.

Default logging

When a connector is installed by Easit, logging is activated. By default, a connector writes its logs to a folder called logs and rotates them daily.

In the logs folder you can find multiple files such as *integration.log, *_stderr.log and *_stdout.log. These files contain logging regarding the actual connector, other files in this folder is, for example, the log files for Apache Tomcat.

Customize logging

From time to time, you might have the need to change (for a number of reasons) how and what is written to the logs. This can be done by changing the file log4j.properties in the config folder for the connector.

1
2
3
4
5
6
7
8
    Get-ChildItem -Path 'D:\Easit\JiraConnector' -Recurse -Include 'nameoffile.extension' -File

        Directory: D:\Easit\JiraConnector\config


        Mode                 LastWriteTime         Length Name
        ----                 -------------         ------ ----
        d-----        2023-09-13     09:59                log4j.properties

log4j.properties

In this file you can find the logging configuration used by the connector when installed. For a more depth documentation, please advise the Log4j package documentation here.

appender.OUT

Specifies what class / appender to use for printing output to the console.

layout

Specifies what layout to use for writing data. The layout does not need to be set if the appender implementation has its own layout.

ConversionPattern

Specifies what each message written should contain.

  • Pattern: %d{yyyy-MM-dd} - %d{HH:mm:ss.SSS} - %-5p - %message - %thread - %class{1.}%n
  • Output: Day - Time - Level - Message - Thread - Class
  • Example output: 2023-09-18 - 10:57:00.967 - INFO - Received Ping Request - http-nio-8586-exec-1 - org.apache.camel.spi.CamelLogger

encoding

Specifies the encoding to write log messages with.

appender.RollingAppender

Specifies what class / appender to use for writing log messages to a rolling file with.

File

The name of the file to write to. If the file, or any of its parent directories, do not exist, they will be created.

DatePattern

Specifies the rolling schedule.

For example, if the File option is set to /foo/bar.log and the DatePattern set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/bar.log will be copied to /foo/bar.log.2001-02-16 and logging for 2001-02-17 will continue in /foo/bar.log until it rolls over the next day.

layout

Specifies what layout to use for writing data. The layout does not need to be set if the appender implementation has its own layout.

ConversionPattern

Specifies what each message written should contain.

  • Pattern: %d{yyyy-MM-dd} - %d{HH:mm:ss.SSS} - %-5p - %message - %thread - %class{1.}%n
  • Output: Day - Time - Level - Message - Thread - Class
  • Example output: 2023-09-18 - 10:57:00.967 - INFO - Received Ping Request - http-nio-8586-exec-1 - org.apache.camel.spi.CamelLogger

encoding

Specifies the encoding to write log messages with.