@@ -820,98 +820,34 @@ The MAL seems to misbehave. How can I get more log messages from the MAL used in
**Solution A**
**Java**
MAL is compatible with CII Logging, meaning if you run an application that uses CII Logging, you can configure MAL's logging as part of your application's log config. To learn how to do that, continue at KB article [Adjust CII Log Levels](https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#adjust-cii-log-levels-log).
From MAL 1.1.0, edit the MAL log4j config xml and specify the MAL log levels:
**Solution B**
```plaintext
<Logger name="elt.mal" level="TRACE" />
```
MAL itself does not use CII Logging (CiiLogManager etc.). If you have no application that pulls CII Logging in, you have to configure MAL's logging from scratch, by providing a configuration file and passing that to the MAL instance.
**Cpp**
Example for **Zpb.** For other middlewares, see below
If you desire more fine-grained control, see the list of MAL logger names at KB article [Adjust CII Log Levels](https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#adjust-cii-log-levels-log)
2. Configure log4cplus prior to using CII MAL:
```plaintext
...
...
@@ -935,31 +871,32 @@ auto zpbMal = mal::loadMal("zpb",
);
```
or in **python:**
**Python**
Since MAL is implemented in C++, also the log config used for Python MAL is targeted at log4cplus.
If your problem is that you want to reconfigure MAL logging while the application is already running:
With [ECII-246](https://jira.eso.org/browse/ECII-246), it is possible to change the log levels of the MAL loggers at run-time via a method call:
```plaintext
...
...
@@ -983,50 +920,6 @@ With [ECII-246](https://jira.eso.org/browse/ECII-246), it is possible to change
```
The allowed logger names are listed below.
**Background**
MAL does not use the Cii Logging System (CiiLogManager etc.) directly. Instead, MAL expects logging to be initialized from a configuration file. Note that the format of the log-config differs per programming language.
List of logger names available in the **Cpp MAL / Python MAL:**
Loggers for **mal-zpb**
- malZpbInstancePublisher
- malZpbPublisher
- malZpbClientAsyncImpl
- malZpbServer
- malZpb
- malZpbSubscriber
- malZpbMrvSubscriber
- malZpbBasePubSub
Loggers for **mal-dds**
- malDds
- malDdsSubscriptionManager
- malDdsSubscriptionReaderListener
- malDdsSubscriber
- malDdsPublisher
- malDdsBasePubSub
- malDdsMrvSubscriber
- malDdsRequesterImpl
- malDdsInstancePublisher
Loggers for **mal-opcua**
- malOpcua
- malOpcuaBasePubSub
- malOpcuaMrvSubscriber
- malOpcuaMrvDataMonitor
- malOpcuaInstancePublisher
- malOpcuaPublisher
- malOpcuaSubscriber
- malOpcuaDataPoller
- malOpcuaDataMonitor
- malOpcuaClient
- malOpcuaClientEventLoop
---
...
...
@@ -1652,26 +1545,7 @@ or, the OLDB API seems to be misbehaving, and you want more logs.
**Solution**
Please read the article "[Adjust CII Log Levels \[Log\]](#user-content-adjust-cii-log-levels-log)" in the Log section of this Knowledge Base. The relevant logger names for the OLDB API are:
```plaintext
CiiOldb
CiiOldbDataPoint
CiiOldbDirectoryTreeProvider
CiiOldbFactory
CiiOldbRedisDataPointProvider
CiiOldbRemoteDataPointProvider
CiiOldbRemoteFileProvider
CiiRedisClient
ThreadSubscriberConsumer
config.CiiConfigClient
```
Example: to turn off ERROR logs for testing the existence of non-existing datapoints, use:
**List of Loggers** Generally, to learn about all loggers that are active in your application, add this (temporarily) to your application:
**List of CII Loggers**
CII Logger Names as of CII 5
```plaintext
mal
cii.mal
cii.mal.internal
mal-zpb
cii.mal.zpb.api
cii.mal.zpb.internal
cii.mal.zpb.publisher
cii.mal.zpb.subscriber
cii.mal.zpb.client
cii.mal.zpb.server
mal-dds
cii.mal.dds.api
cii.mal.dds.internal
cii.mal.dds.publisher
cii.mal.dds.subscriber
mal-opcua
cii.mal.opcua.api
cii.mal.opcua.internal
cii.mal.opcua.publisher
cii.mal.opcua.subscriber
cii.mal.opcua.client
mal-mudpi
cii.mal.mudpi.api
cii.mal.mudpi.internal
cii.mal.mudpi.publisher
cii.mal.mudpi.subscriber
cii.mal.mudpi.client
cii.mal.mudpi.server
config(-ng)
cii.config.api
oldb
cii.internal.config.api
cii.internal.redis
cii.oldb.api
cii.oldb.dp
cii.oldb.dp.subscriber
cii.oldb.dp.provider
cii.oldb.dp.provider.redis
cii.oldb.dp.provider.memory
cii.oldb.dp.provider.directory
cii.oldb.gui
cii.oldb.admin.tool
calculation engine
cii.oldb.ce.node.main
cii.oldb.ce.node.dp
cii.oldb.ce.node.engine
cii.oldb.ce.sched.main
cii.oldb.ce.sched.handler
alarm system
cii.alarm.mon
cii-services
cii.mgmt.srv.tool
cii.mgmt.srv.functest
cii benchmarks
cii.oldb.benchmark
```
CII Logger Names up to CII 4
```plaintext
mal-zpb
- malZpbInstancePublisher
- malZpbPublisher
- malZpbClientAsyncImpl
- malZpbServer
- malZpb
- malZpbSubscriber
- malZpbMrvSubscriber
- malZpbBasePubSub
mal-dds
- malDds
- malDdsSubscriptionManager
- malDdsSubscriptionReaderListener
- malDdsSubscriber
- malDdsPublisher
- malDdsBasePubSub
- malDdsMrvSubscriber
- malDdsRequesterImpl
- malDdsInstancePublisher
mal-opcua
- malOpcua
- malOpcuaBasePubSub
- malOpcuaMrvSubscriber
- malOpcuaMrvDataMonitor
- malOpcuaInstancePublisher
- malOpcuaPublisher
- malOpcuaSubscriber
- malOpcuaDataPoller
- malOpcuaDataMonitor
- malOpcuaClient
- malOpcuaClientEventLoop
oldb/config
- CiiOldb
- CiiOldbDataPoint
- CiiOldbDirectoryTreeProvider
- CiiOldbFactory
- CiiOldbRedisDataPointProvider
- CiiOldbRemoteDataPointProvider
- CiiOldbRemoteFileProvider
- CiiRedisClient
- ThreadSubscriberConsumer
- config.CiiConfigClient
```
**Tip: Detect Loggers** Generally, to learn about all loggers that are active in your application, add this (temporarily) to your application:
```plaintext
#include <ciiLogManager.hpp>
...
...
@@ -2232,13 +2206,13 @@ for (int i=0,n=list.size(); i<n; i++) {
}
```
**Log Format** To use a different log format (which CII allows, but the Control System guidelines do not), you can modify the above config like this:
**Tip: Log Format** To use a different log format, you can modify the above config using log4cplus features directly. Be aware that using a custom format will mean various tools of the CII Logging System (Log Viewer, Log Transport) will no longer know how to interpret your logs, i.e. won't be able to process them. Therefore custom formats are mostly only useful for your console output.