LogService
Via the LogService, applications can send log messages into the system via a standardised route.
LogManagers then decide how the log messages are to be processed. The following managers are currently available.
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. |
|
File-based log manager. This is the commonly used manager. |
|
This LogManager sends log messages by email. Log messages are collected up to a set maximum size and then sent. |
|
Messages are output on the standard output streams STDOUT and STDERR. |
|
Manager for the connection of external logging frameworks like log4j. |
Further LogManagers with other types of output can be developed by the user and used by the LogService. Lobster_data provides a programming interface (API) that also allows you to develop your own components in Java. For this, we offer in-depth training. If you are interested, please contact our support or sales staff.
XML Configuration
Note: If you want to modify the configuration file for a service directly in the file system, you will find the appropriate file in the configuration file ./etc/factory.xml. Details about the configuration can be found in the respective documentation of a service. Otherwise, you can edit the configuration file directly via the respective service in the GUI.
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. |
Setting the Parameters for Sending SNMP Entries
The following XML fragment sets the necessary values for sending SNMP entries to SNMP systems.
<
Call
name
=
"setSnmpParams"
>
<
Arg
>hostname.domain</
Arg
>
<
Arg
type
=
"int"
>port</
Arg
>
<
Arg
>username</
Arg
>
<
Arg
>password</
Arg
>
<
Arg
>enterprise-oid</
Arg
>
<
Arg
>trap-oid</
Arg
>
<
Arg
>timeKey</
Arg
>
</
Call
>
The parameters have the following meaning.
Parameter |
Description |
hostname.domain |
The host name of the SNMP server. |
port |
The port of the SNMP server. |
username |
The user name for the SNMP server. |
password |
The password for the SNMP server. |
enterprise-oid |
The enterprise OID, under which the trap OID (and other information) should be placed. |
trap-oid |
The trap OID under which the other elements, such as the message to be sent, are to be placed. |
timeKey |
The key to use under which the time of the log entry is to be stored. |
Adding a LogManager in the Configuration File
The following XML fragment adds a LogManager 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 LogManager to use.
Depending on the LogManager used, it may be possible that it requires further configuration steps.
General Settings in the GUI
(1) Here you can set the log level.
(2) List of the available LogManagers. LogManagers can be started, stopped, removed and added via the context menu.
(3) The selected standard LogManager is used for messages without a specified LogManager.
(4) Indicates whether sending SNMP entries to SNMP systems is enabled.
Adding a New LogManager in the GUI
In the list of LogManagers, a new LogManager can be added via the context menu.
(1) The name of the LogManager.
(2) The type of the LogManager as described above.