Changes
Page history
Second example on controlling mal-logging from python
authored
Jul 05, 2024
by
Marcus Schilling
Hide whitespace changes
Inline
Side-by-side
KnowledgeBase/CII.md
View page @
bab47584
...
@@ -943,6 +943,22 @@ import elt.pymal as mal
...
@@ -943,6 +943,22 @@ 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"})
```
```
python example with inline config
```
plaintext
import elt.pymal
with open ("/tmp/mal.log.conf", 'w') as f:
f.write('''
log4cplus.appender.stdout=log4cplus::ConsoleAppender
log4cplus.logger.malDds=TRACE, stdout
log4cplus.logger.malDdsBasePubSub=TRACE, stdout
log4cplus.logger.malDdsSubscriber=TRACE, stdout
''')
ddsMalProps = {"dds.log4cplus.filename" : "/tmp/mal.log.conf"}
ddsMal = elt.pymal.loadMalForUri("dds.ps://", ddsMalProps)
```
**Solution B**
**Solution B**
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:
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:
...
...
...
...