LogService

Via the LogService, applications can send log messages into the system via a standardised route.

Log managers then decide how the log messages are to be processed. The following log managers are currently available.


DevNullLogManager

Incoming log messages are ignored. This manager can be used to prevent the LogService from issuing messages on standard output if no other manager is set. This procedure makes sense, for example, in automated test scenarios.

FileLogManager

File-based log manager. This is the commonly used manager.

MailLogManager

This log manager sends log messages by email. Log messages are collected up to a set maximum size and then sent.

StdStreamLogManager

Messages are output on the standard output streams "STDOUT" and "STDERR".

ExternalManager

Manager for the connection of external logging frameworks like "log4j".


Further log managers with other types of output can be developed by the user and used by the LogService. We provide a programming interface (API) that also allows you to develop your own classes in Java. For this, we offer in-depth training. If you are interested, please contact our support or sales staff.

XML configuration


Important note: The availability of a service depends on the license purchased and whether the service has been registered in the configuration file ./etc/factory.xml of the Service Factory (changes require server restart!). There you will also find the responsible configuration file for a service, otherwise you can also edit the configuration file of the service directly in the GUI of the service (changes require a service restart!).

Basic configuration in the XML file

The following XML fragment with all possible basic settings can be used for the configuration of the LogService.

<Set name="debugLevel">3</Set>
<Set name="defaultManager">internal</Set>


The parameters have the following meaning.


Parameter

Description

debugLevel

The log level to use. See below.

defaultManager

The default LogManager to use if no explicit LogManager has been specified.

Log level


Value

Description

0

Production - This is the lowest level and produces the fewest entries.

1

Low.

2

Medium - This is the default level after installing the Integration Server.

3

High.

4

All - This is the log level that creates the most entries.

Adding a log manager in the configuration file


The following XML fragment adds a log manager to the LogService.

<Call name="addManager">
<Arg>name</Arg>
<Arg>
<New class="class_name_of_the_LogManager_to_use">
</New>
</Arg>
</Call>


The first parameter is the name under which the manager should be known to the LogService. The second parameter is the instantiated class of the log manager to use.

Depending on the log manager used, it may be possible that it requires further configuration steps.

General settings in the GUI


images/download/attachments/177898665/Services_60_EN-version-1-modificationdate-1716277825137-api-v2.png

images/download/attachments/177898665/Services_61_EN-version-1-modificationdate-1716277824050-api-v2.png


(1) Here you can set the log level.

(2) List of the available log managers. Log managers can be started, stopped, removed and added via the context menu.

(3) The selected standard log manager is used for messages without a specified log manager.

(4) Indicates whether sending SNMP entries to SNMP systems is enabled.

Adding a new log manager in the GUI


In the list of log managers, a new log manager can be added via the context menu.


images/download/thumbnails/177898665/Services_14_EN-version-1-modificationdate-1716277825140-api-v2.png


(1) The name of the log manager.

(2) The type of the log manager as described above.