Improve log article authored by Marcus Schilling's avatar Marcus Schilling
...@@ -828,7 +828,10 @@ MAL itself does not use CII Logging (CiiLogManager etc.). If you have no applica ...@@ -828,7 +828,10 @@ MAL itself does not use CII Logging (CiiLogManager etc.). If you have no applica
**Cpp** **Cpp**
1. Put a log-config file into your file system: 1. Put a log-config file into your file system like below.
Note: In this example we configure two loggers: the root logger and the "cii.mal" logger. See the full list of possible logger names at KB article [Adjust CII Log Levels](https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#adjust-cii-log-levels-log). In particular, if you use CII 4, find there the list of CII 4 loggers (configuring the "cii.mal" logger under CII 4 won't have any effect).
```plaintext ```plaintext
# Console: Date Level Logger: Message # Console: Date Level Logger: Message
...@@ -845,9 +848,6 @@ log4cplus.appender.MyFileAppender.layout=log4cplus::PatternLayout ...@@ -845,9 +848,6 @@ log4cplus.appender.MyFileAppender.layout=log4cplus::PatternLayout
log4cplus.appender.MyFileAppender.layout.ConversionPattern=%D{%Y/%m/%d %H:%M:%S:%q} %-5p %c [%t %-l]: %m%n log4cplus.appender.MyFileAppender.layout.ConversionPattern=%D{%Y/%m/%d %H:%M:%S:%q} %-5p %c [%t %-l]: %m%n
``` ```
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: 2. Configure log4cplus prior to using CII MAL:
```plaintext ```plaintext
...@@ -877,7 +877,9 @@ Since MAL is implemented in C++, also the log config used for Python MAL is targ ...@@ -877,7 +877,9 @@ Since MAL is implemented in C++, also the log config used for Python MAL is targ
```plaintext ```plaintext
import elt.pymal as mal import elt.pymal as mal
zpbMal = mal.loadMal ("zpb", {"zpb.log4cplus.filename":"/path/to/mal-log4cplus.conf"}) zpbMal = mal.loadMal ("zpb", {"zpb.log4cplus.filename":"/path/to/mal-log4cplus.conf"})
ddsMal = mal.loadMal ("dds", {"dds.log4cplus.filename":"/path/to/mal-log4cplus.conf"})
opcMal = mal.loadMal ("opcua", {"opc.log4cplus.filename":"/path/to/mal-log4cplus.conf"})
``` ```
Python example with inline config Python example with inline config
...@@ -2001,15 +2003,6 @@ void elt::log::CiiLogManager::SetLogLevel(const std::string logger_name, log4cpl ...@@ -2001,15 +2003,6 @@ void elt::log::CiiLogManager::SetLogLevel(const std::string logger_name, log4cpl
void elt::log::CiiLogManager::SetLogLevel(log4cplus::Logger logger, log4cplus::LogLevel level) void elt::log::CiiLogManager::SetLogLevel(log4cplus::Logger logger, log4cplus::LogLevel level)
``` ```
**Java** added methods:
```plaintext
void elt.log.CiiLogManager.setLogLevel(
final String loggerName, final org.apache.logging.log4j.Level level);
void elt.log.CiiLogManager.setLogLevel(
org.apache.logging.log4j.Logger logger, final org.apache.logging.log4j.Level level)
```
**Python** added methods: **Python** added methods:
```plaintext ```plaintext
...@@ -2175,6 +2168,7 @@ mal-opcua ...@@ -2175,6 +2168,7 @@ mal-opcua
- malOpcuaDataMonitor - malOpcuaDataMonitor
- malOpcuaClient - malOpcuaClient
- malOpcuaClientEventLoop - malOpcuaClientEventLoop
- malOpcuaOpen62541
oldb/config oldb/config
- CiiOldb - CiiOldb
- CiiOldbDataPoint - CiiOldbDataPoint
... ...
......