Skip to content

Commit 60a0f89

Browse files
committed
Avoid opening/closing syslog (which may have been causing lost logs), and add syslog prefix.
1 parent 47ff232 commit 60a0f89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ChangeLog

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ sasl-xoauth2 (0.25) unstable; urgency=low [NOT YET RELEASED]
33
* Prevent truncation when writing logs.
44
* Allow token-level username overrides.
55
* Script that updates CA certificates creates directories if missing.
6+
* Avoid opening/closing syslog (which may have been causing lost logs), and
7+
add syslog prefix.
68

7-
-- Tarick Bedeir <[email protected]> Sun, 08 Sep 2024 20:30:00 -0700
9+
-- Tarick Bedeir <[email protected]> Sun, 27 Oct 2024 11:22:00 -0400
810

911
sasl-xoauth2 (0.24) unstable; urgency=low
1012

src/log.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ class SysLogLogger : public LogImpl {
5353
~SysLogLogger() override = default;
5454

5555
void WriteLine(const std::string &line) override {
56-
openlog("sasl-xoauth2", 0, 0);
57-
syslog(LOG_WARNING, "%s\n", line.c_str());
58-
closelog();
56+
syslog(LOG_WARNING, "[sasl-xoauth2] %s\n", line.c_str());
5957
}
6058
};
6159

0 commit comments

Comments
 (0)