mirror of
https://github.com/esphome/esphome.git
synced 2025-08-05 09:57:47 +00:00
[syslog] Fix RFC3164 timestamp compliance for single-digit days (#10034)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
parent
4f58e1c8b9
commit
fd442cc485
@ -35,7 +35,7 @@ void Syslog::log_(const int level, const char *tag, const char *message, size_t
|
|||||||
severity = LOG_LEVEL_TO_SYSLOG_SEVERITY[level];
|
severity = LOG_LEVEL_TO_SYSLOG_SEVERITY[level];
|
||||||
}
|
}
|
||||||
int pri = this->facility_ * 8 + severity;
|
int pri = this->facility_ * 8 + severity;
|
||||||
auto timestamp = this->time_->now().strftime("%b %d %H:%M:%S");
|
auto timestamp = this->time_->now().strftime("%b %e %H:%M:%S");
|
||||||
size_t len = message_len;
|
size_t len = message_len;
|
||||||
// remove color formatting
|
// remove color formatting
|
||||||
if (this->strip_ && message[0] == 0x1B && len > 11) {
|
if (this->strip_ && message[0] == 0x1B && len > 11) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user