| ... | @@ -2017,7 +2017,9 @@ elt.log.CiiLogManager.set_log_level(name_or_logger: Union\[str, logging.Logger\] |
... | @@ -2017,7 +2017,9 @@ elt.log.CiiLogManager.set_log_level(name_or_logger: Union\[str, logging.Logger\] |
|
|
|
|
|
|
|
### Adjust CII Log Levels \[Log\]
|
|
### Adjust CII Log Levels \[Log\]
|
|
|
|
|
|
|
|
With plain CII (no application frameworks on top), you define a log config file (myapp.logconfig):
|
|
**With plain CII (no application framework on top)**
|
|
|
|
|
|
|
|
Define a log config file (myapp.logconfig):
|
|
|
|
|
|
|
|
```plaintext
|
|
```plaintext
|
|
|
log4cplus.rootLogger=INFO, STDOUT
|
|
log4cplus.rootLogger=INFO, STDOUT
|
| ... | @@ -2053,12 +2055,17 @@ int main(int ac, char *av[]) { |
... | @@ -2053,12 +2055,17 @@ int main(int ac, char *av[]) { |
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
If you have an application that configures logging anyway (e.g. a RAD application), you can add the logger config directly to your existing log config file.
|
|
**With a framework on top (e.g. RAD)**
|
|
|
|
|
|
|
|
If you have an application that configures logging anyway (e.g. a RAD
|
|
|
|
application), you can add the logger config directly to your existing log config file.
|
|
|
```plaintext
|
|
```plaintext
|
|
|
log4cplus.logger.cii.mal=FATAL
|
|
log4cplus.logger.cii.mal=FATAL
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Side-note: To configure the logging fully programmatically, without a file, you would do:
|
|
**Programmatic (not using a log config file)**
|
|
|
|
|
|
|
|
cpp: To configure the logging fully programmatically, without a file, you would do:
|
|
|
```plaintext
|
|
```plaintext
|
|
|
::elt::log::CiiLogManager::Configure({
|
|
::elt::log::CiiLogManager::Configure({
|
|
|
{"log4cplus.appender.ConsoleAppender", "log4cplus::ConsoleAppender"},
|
|
{"log4cplus.appender.ConsoleAppender", "log4cplus::ConsoleAppender"},
|
| ... | @@ -2067,7 +2074,7 @@ Side-note: To configure the logging fully programmatically, without a file, you |
... | @@ -2067,7 +2074,7 @@ Side-note: To configure the logging fully programmatically, without a file, you |
|
|
});
|
|
});
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Side-note 2: To configure the oldb logging from python, you would do:
|
|
python: To configure the oldb logging from python, you would do:
|
|
|
```plaintext
|
|
```plaintext
|
|
|
from elt.log import CiiLogManager
|
|
from elt.log import CiiLogManager
|
|
|
|
|
|
| ... | | ... | |