Skip to content

Commit f1f638f

Browse files
committed
MCU8MASS-980 Add case for log level NONE
1 parent 1a38d1d commit f1f638f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/serial/serial.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ void setup() {
3939
// info: info, warning and error messages
4040
// warn: Warning and error messages
4141
// error: Only error messages
42+
// none: No messages
4243
//
4344
// Note that raw messages always will be printed
4445
Log.setLogLevel(LogLevel::DEBUG);
@@ -67,6 +68,13 @@ void setup() {
6768
Log.info("This will not be printed now");
6869
Log.warn("This will not be printed now");
6970
Log.error("An error message");
71+
72+
Log.setLogLevel(LogLevel::NONE);
73+
Log.raw(""); // Just to add a newline
74+
Log.debug("This will not be printed now");
75+
Log.info("This will not be printed now");
76+
Log.warn("This will not be printed now");
77+
Log.error("This will not be printed now");
7078
Log.raw(""); // Just to add a newline
7179

7280
Log.setLogLevel(LogLevel::INFO);

0 commit comments

Comments
 (0)