Skip to content

Commit

Permalink
Avoid opening/closing syslog (which may have been causing lost logs),…
Browse files Browse the repository at this point in the history
… and add syslog prefix.
  • Loading branch information
tarickb committed Oct 27, 2024
1 parent 47ff232 commit 60a0f89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ sasl-xoauth2 (0.25) unstable; urgency=low [NOT YET RELEASED]
* Prevent truncation when writing logs.
* Allow token-level username overrides.
* Script that updates CA certificates creates directories if missing.
* Avoid opening/closing syslog (which may have been causing lost logs), and
add syslog prefix.

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

sasl-xoauth2 (0.24) unstable; urgency=low

Expand Down
4 changes: 1 addition & 3 deletions src/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ class SysLogLogger : public LogImpl {
~SysLogLogger() override = default;

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

Expand Down

0 comments on commit 60a0f89

Please sign in to comment.