Skip to content

Commit 724aa81

Browse files
committed
Improve descriptions of the levels and modes
1 parent 0c9ec20 commit 724aa81

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

docs/+current/modules/logging/01_levels.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,37 @@ author: RSP Systems A/S
1414
The logging module defines the following log levels (_severities_), from
1515
[PSR-3: Logger Interface](https://www.php-fig.org/psr/psr-3/) - (_In accordance with [RFC 5424](https://datatracker.ietf.org/doc/html/rfc5424)_).
1616

17-
* `EMERGENCY_LEVEL`: _Emergency: system is unusable._
18-
* `ALERT_LEVEL`: _Alert: action must be taken immediately._
19-
* `CRITICAL_LEVEL`: _Critical: critical conditions._
20-
* `ERROR_LEVEL`: _Error: error conditions._
21-
* `WARNING_LEVEL`: _Warning: warning conditions._
22-
* `NOTICE_LEVEL`: _Notice: normal but significant condition._
23-
* `INFO_LEVEL`: _Informational: informational messages._
24-
* `DEBUG_LEVEL`: _Debug: debug-level messages._
17+
| Psr Log Level | Description |
18+
|-------------------|-----------------------------------|
19+
| `EMERGENCY_LEVEL` | System is unusable. |
20+
| `ALERT_LEVEL` | Action must be taken immediately. |
21+
| `CRITICAL_LEVEL` | Critical conditions. |
22+
| `ERROR_LEVEL` | Error conditions. |
23+
| `WARNING_LEVEL` | Warning conditions. |
24+
| `NOTICE_LEVEL` | Normal but significant condition. |
25+
| `INFO_LEVEL` | Informational messages. |
26+
| `DEBUG_LEVEL` | Debug-level messages. |
2527

2628
## CMake Message Modes
2729

2830
All the PSR log levels are associated with the following cmake [message modes](https://cmake.org/cmake/help/latest/command/message.html#general-messages).
29-
This means that cmake's [message log level](https://cmake.org/cmake/help/latest/command/cmake_language.html#get-message-log-level)
31+
This means that cmake's [current log level](https://cmake.org/cmake/help/latest/command/cmake_language.html#get-message-log-level)
3032
is respected, when using any of the logging functions that are offered by this module.
3133

32-
| Psr Log Level | CMake Message Mode |
33-
|-------------------|--------------------|
34-
| `EMERGENCY_LEVEL` | `FATAL_ERROR` |
35-
| `ALERT_LEVEL` | `FATAL_ERROR` |
36-
| `CRITICAL_LEVEL` | `FATAL_ERROR` |
37-
| `ERROR_LEVEL` | `SEND_ERROR` |
38-
| `WARNING_LEVEL` | `WARNING` |
39-
| `NOTICE_LEVEL` | `NOTICE` |
40-
| `INFO_LEVEL` | `NOTICE` |
41-
| `DEBUG_LEVEL` | `DEBUG` |
34+
| Psr Log Level | CMake Message Mode | Mode Description |
35+
|-------------------|--------------------|----------------------------------------------------------|
36+
| `EMERGENCY_LEVEL` | `FATAL_ERROR` | CMake Error, stops processing and generation. |
37+
| `ALERT_LEVEL` | `FATAL_ERROR` | CMake Error, stops processing and generation. |
38+
| `CRITICAL_LEVEL` | `FATAL_ERROR` | CMake Error, stops processing and generation. |
39+
| `ERROR_LEVEL` | `SEND_ERROR` | CMake Error, continues processing, but skips generation. |
40+
| `WARNING_LEVEL` | `WARNING` | CMake Warning, continues processing. |
41+
| `NOTICE_LEVEL` | `NOTICE` | Important message printed to stderr. |
42+
| `INFO_LEVEL` | `NOTICE` | Important message printed to stderr. |
43+
| `DEBUG_LEVEL` | `DEBUG` | Detailed informational messages intended for developers. |
4244

4345
## Customize
4446

45-
To change the default PSR log level / cmake message mode association, set the `RSP_LOG_LEVELS_CMAKE` property,
47+
To change the default PSR log level / cmake message mode association, set the `RSP_LOG_LEVELS_CMAKE` list property,
4648
before you include the `rsp/logging` module
4749
or by [force](https://cmake.org/cmake/help/latest/command/set.html#set-cache-entry) caching the property.
4850

@@ -51,7 +53,7 @@ Use the following format for associating the levels:
5153
```txt
5254
"<psr> <cmake_mode>"
5355
```
54-
* _`<psr>`_: PSR log level name (_lowercase_).
56+
* _`<psr>`_: PSR log level name.
5557
* _`<cmake_mode>`_: cmake's [message modes](https://cmake.org/cmake/help/latest/command/message.html#general-messages).
5658

5759
```cmake

0 commit comments

Comments
 (0)