Entering content frame

Procedure documentation Registering a Log via the Socket Connection Locate the document in its SAP Library structure

Run the register_log.bat batch command file with parameters that identify the log. 

The format of the command is the following

register_log <hostname> <port> <logfile_type> <logfile name>

Description of the Parameters

Parameter

Description

<hostname>

Name of the host system to be monitored

<port>

The number of the port on the system where the server is listening for new log.

The default port is configured during the installation (only on the dispatcher), it is 50000 (base port) + 9.

This graphic is explained in the accompanying text

The port for the standalone server can be found in the LogviewerServer.properties file. The property is called socketPort.

On the J2EE engine you find the port using the Config Tool and view the logviewer service on the server.  The name of the key property is Logviewer_socketPort.  Note also that the J2EE port has a lifetime only as long as the lifetime of the J2EE engine.

<logfile_name>

The full path name of log file to be monitored.  The physical file must be on the server.

<logfile_type>

The log type to be monitored – a specific log reader is invoked by Log Viewer to view the log type.

Possible log type readers are: List Format, SAT Format, ASCII Fromat.

This graphic is explained in the accompanying text

To monitor log file c:\test\test.log of type List log on local host port 50009, run the register_log batch command as follows:

register_log localhost 50009 ListLog c:\test\test.log

 

Since log files that get registered via the J2EE engine socket (Logviewer_socketPort) have the same lifespan as the J2EE Engine, you may want to use some way to register logs persistently. Two options are provided:

·         Automatic registration of logs by the logging framework.

·         Configuration of ASCII logs in properties.

See also:

Adding Log Files

Registration of Log via LogDirectory

 

Registering Text Format Logs in the Properties

Unformatted text files can be registered upon startup of the log viewer by putting them into the properties. This allows important files to be viewed even if the Logging framework does not register them.

Description of the Properties used for Text format pre-registering:

Property

Description

Logviewer_ASCIILogPath=../../../work;

A PATH-like list of files, directories or directory trees that can be registered. A file is specified using it’s file name (for example: /usr/sap/textfile). A directory is specified by its name – all files in that directory will be registered (for example: /usr/sap/C11/work). A directory tree is specified by a directory name followed by “…” (three dots with no quotes) – all the files in the directory and all the files in all the subdirectories will be registered.

The example is the default setting for the J2EE server. There the current directory (the working directory of the cluster node), and the work directory are specified.

Logviewer_PathSeparator=;

If this variable is not specified the operating system specific path separator is used. This is necessary because the properties have to work on both Windows and Unix (plus other supported platforms). Logviewer_ASCIILogPath with a “;” would not work on Unix, because there “:” is the OS-specific path separator.

This path separator is also used in the MonitorablePath property.

 

Leaving content frame