Log File Structure
The Request and Access log files each display specific type of activity and as such have a consistent and specific file structure for maximum readability
The service log file console pattern uses colors to highlight the service type and message level. On Windows console colors should be disabled.
|The date and time the message was logged, in UTC time with the standard format: [yyyy-MM-dd'T'HH:mm:ss.SSSZ] based on RFC-3339||2018-11-18T15:39:04.902Z|
The service type, color coordinated with a specific color for each service, including:
Cross product services (such as router, tomcat, scripts) use the same color.
The service identifier as a 4 to 6 character long, including:
|The trace id value. Trace id is used to identify a request across services||4b1b8a0b04e31b80|
Class and Line Number
|The fully qualified class name and line number printing this log entry.||s.r.NodeRegistryServiceImpl:44|
|The thread printing this log entry. "main" if not java.||[http-exec-4 ]|
|The log entry message.||Hello JFrog|
The request log file pattern contains a list of pipe ("|") separated values. The file pattern will contain the same number of columns, if a value is missing it will be empty.
Note: If not provided by the client, the 'Request Content-Length' value is initialised as "-1".
|The date and time the request was completed and entered into the log file, in UTC time with the standard format: [yyyy-MM-dd'T'HH:mm:ss.SSSZ].||2018-11-18T15:39:04.902Z|
|The trace id value.||4b1b8a0b04e31b80|
|The IP address of the remote caller (ipv4 or ipv6).||10.0.12.3|
|The requesting user's username or "anonymous" when accessed anonymously.||benn|
The HTTP request method, in UPPERCASE.
|The relative URL for the request.||api/v1/cert/root|
|The HTTP return code for the request.||201|
Response Content Length
The size of the server response in bytes, for example, the size of downloaded file.
Request Content Length
|The size of the user request in bytes, for example, the size of an uploaded file. -1 if unknown.|
|The time in ms for the request to process.|
Request User Agent
|The request user agent.|
JFrog Access Java Client/4.1.12
Router Request Log
The JFrog Router has a JSON based access log containing all the requests that went through the Router, including service service communication.
Below is an example of an entry in the Router request log (router-request.log)
|Address of the backend server the request was forwarded to|
|The IP address of the remote caller in its original form (ipv4 or ipv6, usually IP:port).||127.0.0.1:61899|
|The number of bytes in the response entity returned to the client.||2|
|The HTTP return code for the request.||200|
|The time in nanoseconds for the request to process.||8353000|
The HTTP request method, in UPPERCASE.
|The relative URL for the request.||/router/api/v1/system/ping|
The date and time request processing has started, in UTC time with the standard format: [yyyy-MM-dd'T'HH:mm:ss.SSSZ].
|The full trace id value.||4ccb40200c199346:1a3f95ce1b27711d:71e15f8b6031c9e9:0|
|The request user agent.||curl/7.54.0|
|The date and time the request was completed and entered into the log file, in UTC time with the standard format: [yyyy-MM-dd'T'HH:mm:ss.SSSZ]|
time / msg
|Default info and empty message|
The console log file appends the console outputs of all services into one common log file.
Log rotation is configured to occur every hour using a cron job for Docker Compose and native installations.
Log rotation is not available in the following installations:
- Manual Docker Compose (which don't use the bundled script)
Since this file is written to by all services and can grow quickly, it is recommended to manage it by either by disabling it using the
shared.logging.consoleLog.enabled configuration in the
system.yaml, or by setting up your own log rotation.
Viewing Log Files from the UI
You can view or download essential Artifactory log files from the UI.
In the Administration module, go to Artifactory | Advanced | System Logs, select the file you want to view from the drop-list. The log tail view is automatically refreshed every few seconds, however can be paused and resumed if you wish to browse the log.
To save system resources, do not leave the log view open in your browser unnecessarily.
Sending Logs to Syslog
Some sites want to consolidate logs into the syslog facility. The following steps will enable you to send your Java microservices logs to syslog.
Configure the logback library
Edit the logback xml file in the
$JFROG_HOME/<product>/var/etc/<microservice>/logback.xml file. For example, to configure Artifactory to use syslog, edit the
Add the following syslog appender to the logback xml (next to the other appenders)
Add the following appender to the output:
- Save the file, and restart the service.
Configure syslog on your machine
Since logback is using internet sockets, you have to make sure your syslog facility accepts them. Modern Linux distributions are using the rsyslog daemon for syslogging. Ensure that the configuration for internet domain sockets is enabled, either by editing
/etc/rsyslog.conf and uncommenting:
or placing it in a file under
/etc/rsyslog.d ending in
Configuring Log Verbosity
There are two ways to configure log verbosity, depending on if your JFrog microservice is logback based (Java microservices) or not.
Using logback (Java based microservices)
The verbosity of any Java based logger in your system can be configured by entering or modifying the level value in the corresponding entry in the Logback configuration file
JFROG_HOME/<product>/var/etc/<microservice>/logback.xml. For example, to configure the Artifactory log verbosity, edit the
Changes made to the logging configuration are reloaded within several seconds without requiring a restart.
Using system.yaml (non Java microservices)
The verbosity of any non Java based logger in your system can be configured by entering or modifying the level value in the corresponding entry in the
system.yaml configuration file
Changes made to the logging configuration requires a restart.