You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's kinda lame, because the len arg is not only used for the length, as you can see in the man page:
SYSLOG_ACTION_CONSOLE_LEVEL (8)
The call sets console_loglevel to the value given in len,
which must be an integer between 1 and 8 (inclusive). The
kernel silently enforces a minimum value of
minimum_console_loglevel for len. See the log level section
for details. The bufp argument is ignored.
So now you, either you gotta construct the unix.Syscall yourself or trick Klogctl into passing the right length:
unix.Klogctl(8, []byte{1, 2}) // Set console level 2!// Yah ok this is silly
Perhaps there should be another function like this?
Linux sys_syslog looks like this:
In Go's x/sys/unix, it's this
That's kinda lame, because the
len
arg is not only used for the length, as you can see in the man page:So now you, either you gotta construct the
unix.Syscall
yourself or trick Klogctl into passing the right length:Perhaps there should be another function like this?
The text was updated successfully, but these errors were encountered: