diff --git a/src/platform/Linux/CHIPLinuxStorageIni.cpp b/src/platform/Linux/CHIPLinuxStorageIni.cpp index 1a968876282e1a..7186fe3d477fbf 100644 --- a/src/platform/Linux/CHIPLinuxStorageIni.cpp +++ b/src/platform/Linux/CHIPLinuxStorageIni.cpp @@ -98,17 +98,13 @@ CHIP_ERROR ChipLinuxStorageIni::CommitConfig(const std::string & configFile) if (fd != -1) { std::ofstream ofs; - - ChipLogProgress(DeviceLayer, "writing settings to file (%s)", tmpPath.c_str()); - ofs.open(tmpPath, std::ofstream::out | std::ofstream::trunc); mConfigStore.generate(ofs); - close(fd); if (rename(tmpPath.c_str(), configFile.c_str()) == 0) { - ChipLogProgress(DeviceLayer, "renamed tmp file to file (%s)", configFile.c_str()); + ChipLogDetail(DeviceLayer, "wrote settings to %s", configFile.c_str()); } else { diff --git a/src/platform/logging/impl/Syslog.cpp b/src/platform/logging/impl/Syslog.cpp index 163e6d7398aefe..638cffeb94215e 100644 --- a/src/platform/logging/impl/Syslog.cpp +++ b/src/platform/logging/impl/Syslog.cpp @@ -23,6 +23,14 @@ #include #include +#ifndef CHIP_SYSLOG_IDENT +#define CHIP_SYSLOG_IDENT nullptr +#endif + +#ifndef CHIP_SYSLOG_FACILITY +#define CHIP_SYSLOG_FACILITY LOG_DAEMON +#endif + namespace chip { namespace Logging { namespace Platform { @@ -51,7 +59,7 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) if (!sInitialized) { - openlog(nullptr, 0, LOG_DAEMON); + openlog(CHIP_SYSLOG_IDENT, LOG_CONS | LOG_PID, CHIP_SYSLOG_FACILITY); sInitialized = true; }