-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log/syslog: defaults to LOG_KERN facility #20297
Comments
That package is frozen, so unless you can propose a safe fix that doesn't impact existing users much and doesn't add any new API, I think the best we can do is add docs. |
@bradfitz I'll dig into the code - I don't see why any API changes would be necessary, just a change in a default value. I'll look when I get a little time. |
@bradfitz because of the current implementation, I don't see a good path to fixing this that a) doesn't cause unwanted side effects and b) doesn't add new API. Was worth a look, but unfortunately I don't have a good answer. |
So, new docs then? |
@bradfitz - I am a bit confused as to what to add in the docs. Should we say that |
I'll let others on this bug decide what the appropriate documentation would be. I can help review its wording, but I don't know what content is appropriate. |
It doesn't look like we need any more docs, they already state the current defaults (which we can't change). |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.8 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/bknox/go"
GORACE=""
GOROOT="/home/bknox/.go"
GOTOOLDIR="/home/bknox/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build317260052=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
used log/syslog with defaults
From the log/syslog documentation:
"The Priority is a combination of the syslog facility and severity. For example, LOG_ALERT | LOG_FTP sends an alert severity message from the FTP facility. The default severity is LOG_EMERG; the default facility is LOG_KERN."
From RFC3164:
"The Facilities and Severities of the messages are numerically coded
with decimal values. Some of the operating system daemons and
processes have been assigned Facility values. Processes and daemons
that have not been explicitly assigned a Facility may use any of the
"local use" facilities or they may use the "user-level" Facility."
LOG_KERN is a poor default, as nothing should ever be using that facility other than the kernel. LOG_USER would be a more appropriate default facility.
The text was updated successfully, but these errors were encountered: