Skip to content

Commit

Permalink
sources/logger.c: set logger lvl type (#763)
Browse files Browse the repository at this point in the history
Otherwise it will crash at logger.c:444 in
od_log_syslog_level[lvl] with random lvl value

Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
  • Loading branch information
rkhapov and rkhapov authored Feb 10, 2025
1 parent 188bccd commit 1357826
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sources/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ extern void od_logger_write_plain(od_logger_t *logger, od_logger_level_t level,
_od_log_entry *le = machine_msg_data(msg);
strncpy(le->msg, output, len);
le->msg[len] = '\0';
le->lvl = level;

machine_channel_write(logger->task_channel, msg);
} else {
Expand Down

0 comments on commit 1357826

Please # to comment.