mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
471 B
26 lines
471 B
package log
|
|
|
|
func (this *Config) Apply() error {
|
|
if this == nil {
|
|
return nil
|
|
}
|
|
if this.AccessLogType == LogType_File {
|
|
if err := InitAccessLogger(this.AccessLogPath); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if this.ErrorLogType == LogType_None {
|
|
SetLogLevel(LogLevel_Disabled)
|
|
} else {
|
|
if this.ErrorLogType == LogType_File {
|
|
if err := InitErrorLogger(this.ErrorLogPath); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
SetLogLevel(this.ErrorLogLevel)
|
|
}
|
|
|
|
return nil
|
|
}
|