Skip to content

Commit 3908232

Browse files
committed
Do not display prefix and suffix if showLevel is false
1 parent 6ff553a commit 3908232

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ArduinoLog",
33
"keywords": "logging, debug, log, log levels, AVR, ESP8266",
44
"description": "ArduinoLog is a minimalistic logging framework to help the programmer output log statements to a variety of output targets. ArduinoLog is designed so that log statements can remain in the code with minimal performance cost. In order to facilitate this the loglevel can be adjusted, and if the code is completely tested all logging code can be compiled out. Tested for AVR, ESP8266 & ESP32 boards. Detailed instructions for use on Github page.",
5-
"version": "1.2.0",
5+
"version": "1.2.1",
66
"authors":
77
[
88
{

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoLog
2-
version=1.2.0
2+
version=1.2.1
33
author=Thijs Elenbaas,Vladimír Záhradník
44
maintainer=Vladimír Záhradník <vladimir.zahradnik@jsctm.cz>
55
sentence=Small logging framework

src/ArduinoLog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class Logging {
402402
}
403403
}
404404

405-
if (_prefix != NULL) {
405+
if (_prefix != NULL && _showLevel) {
406406
for (int i = 0; i < _handlerCount; i++) {
407407
if (_logOutputs[i]) {
408408
_prefix(_logOutputs[i], level);
@@ -420,7 +420,7 @@ class Logging {
420420
va_start(args, msg);
421421
print(msg, args);
422422

423-
if (_suffix != NULL) {
423+
if (_suffix != NULL && _showLevel) {
424424
for (int i = 0; i < _handlerCount; i++) {
425425
if (_logOutputs[i]) {
426426
_suffix(_logOutputs[i], level);

0 commit comments

Comments
 (0)