Skip to content

Commit 1284863

Browse files
committed
INFO and NOTICE are synonymous
1 parent 836bc0b commit 1284863

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

firmware/config/config.h.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
//#define INCLUDE_MDNS // Include mDNS responder, for local name resolution without DNS (disable to save flash/memory)
7373

7474
// Log levels: LOG_LEVEL_SILENT, LOG_LEVEL_FATAL, LOG_LEVEL_ERROR,
75-
// LOG_LEVEL_WARNING, LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, LOG_LEVEL_VERBOSE
76-
#define LOG_LEVEL LOG_LEVEL_VERBOSE
75+
// LOG_LEVEL_WARNING, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_VERBOSE (NOTICE is the same as INFO, it's kept for backward compatability)
76+
#define LOG_LEVEL LOG_LEVEL_INFO
7777

7878
// Enable if you're having issues with the app outputting garbage characters on startup, delay in ms
7979
// #define SERIAL_INTERFACE_INIT_DELAY 4000

references/Developer Guide to Logging.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,20 @@ When using the `ArduinoLog` library, the logging methods correspond to different
2727
- Corresponds to `Log.warning()`.
2828
- Example: `Log.warning("This is a warning");`
2929

30-
5. **`LOG_LEVEL_INFO`**:
30+
5. **`LOG_LEVEL_INFO` and `LOG_LEVEL_NOTICE` **:
3131

3232
- Informational messages, warnings, and errors.
33-
- Corresponds to `Log.info()`.
33+
- Corresponds to `Log.info()` and `Log.notice()`.
34+
- Recommend to use `Log.ino()` as `Log.notice()` only kept for backward compatability
3435
- Example: `Log.info("This is an info message");`
3536

36-
6. **`LOG_LEVEL_NOTICE`**:
37-
38-
- Notice messages, informational messages, warnings, and errors.
39-
- Corresponds to `Log.notice()`.
40-
- Example: `Log.notice("This is a notice");`
41-
42-
7. **`LOG_LEVEL_TRACE`**:
37+
6. **`LOG_LEVEL_TRACE`**:
4338

4439
- Detailed tracing information, notices, informational messages, warnings, and errors.
4540
- Corresponds to `Log.trace()`.
4641
- Example: `Log.trace("This is a trace message");`
4742

48-
8. **`LOG_LEVEL_VERBOSE`**:
43+
7. **`LOG_LEVEL_VERBOSE`**:
4944
- Very detailed tracing information, traces, notices, informational messages, warnings, and errors.
5045
- Corresponds to `Log.verbose()`.
5146
- Example: `Log.verbose("This is a verbose message");`
@@ -55,7 +50,7 @@ When using the `ArduinoLog` library, the logging methods correspond to different
5550
You can set the log level globally in your `config.h` file. For example:
5651

5752
```cpp
58-
#define LOG_LEVEL LOG_LEVEL_INFO
53+
#define LOG_LEVEL LOG_LEVEL_TRACE
5954
```
6055
6156
To use logging in your code, include the following:
@@ -86,8 +81,7 @@ Log.warning("Battery level: %d%%, Status: %s", batteryLevel, status);
8681
## General Guidance
8782

8883
1. Opt for using `Log` instead of `Serial.print` where possible.
89-
2. Keep `INFO` log messages limited and concise to avoid cluttering the serial monitor with messages that may not be meaningful.
90-
3. Use `NOTICE` log messages for events that occur less frequently but are still important.
91-
4. Use `WARNING` log messages for unexpected occurrences during execution that may not cause immediate issues (e.g., "Only 4 stock symbols defined").
92-
5. Use `TRACE` log messages for debugging purposes, such as tracking execution flow or dumping JSON returned from an API call.
93-
6. Use `WARNING` for less critical errors, `ERROR` for more critical errors, and `FATAL` only for the most critical errors.
84+
2. Keep `INFO`, `NOTICE` log messages limited and concise to avoid cluttering the serial monitor with messages that may not be meaningful (`INFO` and `NOTICE` are synonymous).
85+
3. Use `WARNING` log messages for unexpected occurrences during execution that may not cause immediate issues (e.g., "Only 4 stock symbols defined").
86+
4. Use `TRACE` log messages for debugging purposes, such as tracking execution flow or dumping JSON returned from an API call.
87+
5. Use `WARNING` for less critical errors, `ERROR` for more critical errors, and `FATAL` only for the most critical errors.

0 commit comments

Comments
 (0)