mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
dev24, fix syslog timestamp #2704
This commit is contained in:
@@ -48,6 +48,7 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
|
|||||||
- fix wwMaxPower on Junkers ZBS14 [#2609](https://github.com/emsesp/EMS-ESP32/issues/2609)
|
- fix wwMaxPower on Junkers ZBS14 [#2609](https://github.com/emsesp/EMS-ESP32/issues/2609)
|
||||||
- ventilation bypass state from telegram 0x55C [#1197](https://github.com/emsesp/EMS-ESP32/issues/1197)
|
- ventilation bypass state from telegram 0x55C [#1197](https://github.com/emsesp/EMS-ESP32/issues/1197)
|
||||||
- set selflowtemp for ems+ boilers [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
|
- set selflowtemp for ems+ boilers [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
|
||||||
|
- syslog timestamp [#2704](https://github.com/emsesp/EMS-ESP32/issues/2704)
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "uuid/syslog.h"
|
#include "uuid/syslog.h"
|
||||||
|
#include "../../src/core/emsesp.h"
|
||||||
|
|
||||||
#ifndef UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
#ifndef UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
||||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
||||||
@@ -230,8 +231,7 @@ SyslogService::QueuedLogMessage::QueuedLogMessage(unsigned long id, std::shared_
|
|||||||
: id_(id)
|
: id_(id)
|
||||||
, content_(std::move(content)) {
|
, content_(std::move(content)) {
|
||||||
// Added for EMS-ESP
|
// Added for EMS-ESP
|
||||||
// if (time_good_ || emsesp::EMSESP::system_.network_connected()) {
|
if (time_good_ || emsesp::EMSESP::system_.network_connected()) {
|
||||||
if (time_good_) {
|
|
||||||
#if UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
#if UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
||||||
if (gettimeofday(&time_, nullptr) != 0) {
|
if (gettimeofday(&time_, nullptr) != 0) {
|
||||||
time_.tv_sec = (time_t)-1;
|
time_.tv_sec = (time_t)-1;
|
||||||
@@ -523,7 +523,7 @@ bool SyslogService::transmit(const QueuedLogMessage & message) {
|
|||||||
// (unsigned long)message.time_.tv_usec);
|
// (unsigned long)message.time_.tv_usec);
|
||||||
|
|
||||||
// added for EMS-ESP
|
// added for EMS-ESP
|
||||||
udp_.printf("%04u-%02u-%02uT%02u:%02u:%02u.%06lu%+02d:%02d",
|
udp_.printf("%04u-%02u-%02uT%02u:%02u:%02u.%06lu%+03d:%02d",
|
||||||
tm.tm_year + 1900,
|
tm.tm_year + 1900,
|
||||||
tm.tm_mon + 1,
|
tm.tm_mon + 1,
|
||||||
tm.tm_mday,
|
tm.tm_mday,
|
||||||
@@ -537,7 +537,7 @@ bool SyslogService::transmit(const QueuedLogMessage & message) {
|
|||||||
udp_.print('-');
|
udp_.print('-');
|
||||||
}
|
}
|
||||||
|
|
||||||
udp_.printf(" %s %s - - - ", hostname_.c_str(), message.content_->name);
|
udp_.printf(" %s %s - - - ", hostname_.c_str(), message.content_->name ? message.content_->name : "emsesp");
|
||||||
|
|
||||||
char id_c_str[15];
|
char id_c_str[15];
|
||||||
snprintf(id_c_str, sizeof(id_c_str), " %lu: ", message.id_);
|
snprintf(id_c_str, sizeof(id_c_str), " %lu: ", message.id_);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
#include "ESP32React/ESP32React.h"
|
#include "../ESP32React/ESP32React.h"
|
||||||
#else
|
#else
|
||||||
#include "../lib_standalone/ESP32React.h"
|
#include "../lib_standalone/ESP32React.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// UART drivers
|
// UART drivers
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
#include "uart/emsuart_esp32.h"
|
#include "../uart/emsuart_esp32.h"
|
||||||
#elif defined(EMSESP_STANDALONE)
|
#elif defined(EMSESP_STANDALONE)
|
||||||
#include "emsuart_standalone.h"
|
#include "emsuart_standalone.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.7.3-dev.23"
|
#define EMSESP_APP_VERSION "3.7.3-dev.24"
|
||||||
|
|||||||
Reference in New Issue
Block a user