Logging Configuration

log directory is created under the installation directory and used to store all log files. Logs are  rotated into 50 days worth of gzipped dated archives. 

Application Log

The last active application log is found at ./log/clm-server.log and archived logs are compressed with name pattern of clm-server-yyyy-MM-dd.log.gz. The application log can be customized in the logging section of the config.yml file.  

IQ Server 1.43 and newer uses Dropwizard 1.2.2 logging configuration.

IQ Server 1.42 and older uses Dropwizard 0.6.2 configuration.

Request Log

The last active request log is found at ./log/request.log and archived logs are compressed with the name pattern of  request-yyyy-MM-dd.log.gz. The request log can be customized in the requestLog section of the config.yml file.   

IQ Server 1.43 and newer uses Dropwizard 1.2.2 requestLog configuration.

IQ Server 1.42 and older uses Dropwizard 0.6.2 configuration .

Request Log Line Formats

As of IQ Server 1.43 the request log line format is now configurable using patterns defined by the Logback Access PatternLayout  class.

The Sonatype preferred format renders timestamps with the same timezone as the application log to ease comprehension during comparison.

Preferred request.log line format
logFormat: "%clientHost %l %user [%date] \"%requestURL\" %statusCode %bytesSent %elapsedTime \"%header{User-Agent}\""


Concise config.yml example of specifying request.log line format
server:
  requestLog:
     appenders:
       - type: file
         logFormat: "%clientHost %l %user [%date] \"%requestURL\" %statusCode %bytesSent %elapsedTime \"%header{User-Agent}\""
         currentLogFilename: ./log/request.log
         archivedLogFilenamePattern: ./log/request-%d.log.gz
         archivedFileCount: 50
IQ Server 1.45 and newer default request.log line format if unspecified
logFormat: "%clientHost %l %user [%date] \"%requestURL\" %statusCode %bytesSent %elapsedTime \"%header{User-Agent}\""


IQ Server 1.43 and 1.44 default request.log line format if unspecified
logFormat: "%clientHost %l %user [%t{dd/MMM/yyyy:HH:mm:ss Z,UTC}] \"%requestURL\" %statusCode %bytesSent \"%header{Referer}\" \"%header{User-Agent}\" %elapsedTime"
IQ Server 1.42 and earlier request.log line format with simulated dispatch time
# specifying log format only works in version 1.43 or newer
# this example is intended for matching closely what previous versions rendered
logFormat: "%clientHost %l %user [%t{dd/MMM/yyyy:HH:mm:ss Z,UTC}] \"%requestURL\" %statusCode %bytesSent %elapsedTime %elapsedTime"

Audit Log 

NEW IN RELEASE 52

Audit logging is available starting with IQ Server release 52 and is unique compared to application and request logging in that  each line or entry is a JSON object . This allows for easy line-by-line parsing by external tools for inspection, analysis, and extraction of desired data.

By default , audit events are logged to their own file and are not appended to the application log. The last active audit log is found at  ./log/audit.log  and archived audit logs are compressed with the name pattern of  audit-yyyy-MM-dd.log.gz . Audit logging can be customized in the logging section of your config.yml file beneath the base audit logger com.sonatype.insight.audit .

Audit logging only occurs at the INFO level. Thus setting an audit logger level to ALL, TRACE, or DEBUG has no effect, and setting it to WARN, ERROR or OFF will disable it.