diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 14:45:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 14:48:03 +0000 |
commit | e55403ed71282d7bfd8b56df219de3c28a8af064 (patch) | |
tree | 524889e5becb81643bf8741e3082955dca076f09 /src/go/logger | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-e55403ed71282d7bfd8b56df219de3c28a8af064.tar.xz netdata-e55403ed71282d7bfd8b56df219de3c28a8af064.zip |
Merging upstream version 2.0.3+dfsg:
- does not include dygraphs anymore (Closes: #923993)
- does not include pako anymore (Closes: #1042533)
- does not include dashboard binaries anymore (Closes: #1045145)
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/go/logger')
-rw-r--r-- | src/go/logger/journal_linux.go | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/go/logger/journal_linux.go b/src/go/logger/journal_linux.go index 00f335075..f55006bdb 100644 --- a/src/go/logger/journal_linux.go +++ b/src/go/logger/journal_linux.go @@ -5,29 +5,10 @@ package logger import ( - "os" - "strconv" - "strings" - "syscall" + "github.com/coreos/go-systemd/v22/journal" ) func isStderrConnectedToJournal() bool { - stream := os.Getenv("JOURNAL_STREAM") - if stream == "" { - return false - } - - idx := strings.IndexByte(stream, ':') - if idx <= 0 { - return false - } - - dev, ino := stream[:idx], stream[idx+1:] - - var stat syscall.Stat_t - if err := syscall.Fstat(int(os.Stderr.Fd()), &stat); err != nil { - return false - } - - return dev == strconv.Itoa(int(stat.Dev)) && ino == strconv.FormatUint(stat.Ino, 10) + ok, _ := journal.StderrIsJournalStream() + return ok } |