mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
Refactor log util (#2276)
This commit is contained in:
parent
1d6f5482dd
commit
f9c59a7131
@ -19,9 +19,9 @@ func InitLog(logLevel string, logPath string) error {
|
||||
log.Errorf("Failed parsing log-level %s: %s", logLevel, err)
|
||||
return err
|
||||
}
|
||||
custom_outputs := []string{"console", "syslog"};
|
||||
customOutputs := []string{"console", "syslog"};
|
||||
|
||||
if logPath != "" && !slices.Contains(custom_outputs, logPath) {
|
||||
if logPath != "" && !slices.Contains(customOutputs, logPath) {
|
||||
lumberjackLogger := &lumberjack.Logger{
|
||||
// Log file absolute path, os agnostic
|
||||
Filename: filepath.ToSlash(logPath),
|
||||
|
@ -1,3 +1,6 @@
|
||||
package util
|
||||
|
||||
func AddSyslogHook() {}
|
||||
func AddSyslogHook() {
|
||||
// The syslog package is not available for Windows. This adapter is needed
|
||||
// to handle windows build.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user