|
|
|
**Page author:** @cmoineau
|
|
|
|
|
|
|
|
# Understanding log level
|
|
|
|
|
|
|
|
Aidge posses a class ``Log`` that handle the logging of information.
|
|
|
|
|
|
|
|
## How to use
|
|
|
|
|
|
|
|
To use it in **Python**:
|
|
|
|
|
|
|
|
```python
|
|
|
|
aidge_core.Log.notice(f"Saving {output_model.name()}")
|
|
|
|
```
|
|
|
|
In **C++**:
|
|
|
|
```c++
|
|
|
|
Log::notice("Saving {}", output_model.name)());
|
|
|
|
```
|
|
|
|
|
|
|
|
## When to use
|
|
|
|
|
|
|
|
Here is a description of when to use each level:
|
|
|
|
- **debug**: Fine-grained information that are useful for debugging
|
|
|
|
- **info**: Informational message to highlight the progress of the application.
|
|
|
|
- **notice**: Informational message to highlight a normal progress of the application but that are significant. (Note: Default level!)
|
|
|
|
- **warn**: Potential issue due to an unexpected behavior that may lead to an error in the future.
|
|
|
|
- **error**: Indicate an issue but the application may still be able to run.
|
|
|
|
- **fatal**: Very severe issue, the application is forced to be aborted. |
|
|
\ No newline at end of file |