Use the binaryLog command to view or copy the contents of a binary logging repository, or list the available server process instances in the repository. The binaryLog command is equivalent to the logViewer command in the profile bin directory of the full profile application server.
The command syntax is as follows:
binaryLog action {serverName | repositoryPath} [options]
The value of options is different based on the value of action.
The following actions are available for the binaryLog command:
The command syntax is as follows:
binaryLog view {serverName | repositoryPath} [options]
serverName
Specify the name of a Liberty server with a repository to read from.
repositoryPath
Specify the path to a repository to read from. This is typically the directory that contains both the logdata and tracedata directories.
Filter options:
All filters are optional. When multiple filters are used, they are logically ANDed together.
Filter based on minimum record creation date. Value must be specified as either a date (for example --minDate="2/20/13") or a date and time (for example --minDate="2/20/13 16:47:21:445 EST").
Filter based on maximum record creation date. Value must be specified as either a date (for example --maxDate="2/20/13") or a date and time (for example --maxDate="2/20/13 16:47:21:445 EST").
Filter based on minimum level. Value must be one of FINEST | FINER | FINE | DETAIL | CONFIG | INFO | AUDIT | WARNING | SEVERE | FATAL.
Filter based on maximum level. Value must be one of the following: FINEST | FINER | FINE | DETAIL | CONFIG | INFO | AUDIT | WARNING | SEVERE | FATAL.
Include records with specified logger name. Value may include * as a wildcard.
Filter based on message name. Value may include * as a wildcard.
Include records with specified thread id. Values must be in hexadecimal (for example, --includeThread=2a).
Include records with specified extension name and value.
Include records from the specified server instance. Value must either be "latest" or be a valid instance ID. Run this command using the listInstances action to see a list of valid instance IDs.
Continuously monitor the repository and output new content as it is generated.
Specify the output format to use. "basic" is the default format.
Specify the character encoding to use for output.
binaryLog copy {serverName | repositoryPath} targetPath [options]
Specify the name of a Liberty server with a repository to read from.
Specify the path to a repository to read from. This is typically the directory that contains the logdata and tracedata directories.
Specify the path at which to create a new repository. The targetPath must be specified.
Filter options:
Filter based on minimum record creation date. Value must be specified as either a date (for example --minDate="2/20/13") or a date and time (for example --minDate="2/20/13 16:52:32:808 EST").
Filter based on maximum record creation date. Value must be specified as either a date (for example --maxDate="2/20/13") or a date and time (for example --maxDate="2/20/13 16:52:32:808 EST").
Filter based on minimum level. Value must be one of the following: FINEST | FINER | FINE | DETAIL | CONFIG | INFO | AUDIT | WARNING | SEVERE | FATAL.
Filter based on maximum level. Value must be one of the following: FINEST | FINER | FINE | DETAIL | CONFIG | INFO | AUDIT | WARNING | SEVERE | FATAL.
Include records with specified logger name. Value may include * as a wildcard.
Exclude records with specified logger name. Value may include * as a wildcard.
Filter based on message name. Value may include * as a wildcard.
Include records with specified thread id. Values must be in hexadecimal (for example, --includeThread=2a).
Include records with specified extension name and value.
Include records from the specified server instance. Value must either be "latest" or be a valid instance ID. Run this command using the listInstances action to see a list of valid instance IDs.
binaryLog listInstances {serverName | repositoryPath}
Specify the name of a Liberty server with a repository to read from.
Specify the path to a repository to read from. This is typically the directory that contains the logdata and tracedata directories.
See the following examples of binaryLog commands.
binaryLog view --minDate=07/19/13 --maxDate=08/02/13
binaryLog view myServer --monitor --minLevel=WARNING --format=advanced
binaryLog view /apps/server1/logs --includeLogger=SystemErr
binaryLog view --maxDate="09/14/12 16:28:00:000 EDT"
binaryLog view --includeExtension=thread="Default Executor-thread-4" --format=advanced
binaryLog listInstances
Using D:\wlp\usr\servers\defaultServer\logs as repository directory.
Instance ID Start Date
1358809441761 1/21/13 18:04:01:761 EST
1358864476191 1/22/13 9:21:16:191 EST
1358869523192 1/22/13 10:45:23:192 EST
1358871281166 1/22/13 11:14:41:166 EST
1358879829000 1/22/13 13:37:09:000 EST
1358892222067 1/22/13 17:03:42:067 EST
binaryLog view --includeInstance=1358871281166
binaryLog copy defaultServer d:\toSupport --minLevel=warning --includeInstance=latest