1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-12 19:00:43 +00:00

default log settings

This commit is contained in:
Darien Raymond 2016-10-24 15:08:06 +02:00
parent 3373e62193
commit 59fa064cae
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -16,7 +16,11 @@ func (this *LogConfig) Build() *log.Config {
if this == nil {
return nil
}
config := new(log.Config)
config := &log.Config{
ErrorLogType: log.LogType_Console,
AccessLogType: log.LogType_Console,
}
if len(this.AccessLog) > 0 {
config.AccessLogPath = this.AccessLog
config.AccessLogType = log.LogType_File
@ -36,6 +40,7 @@ func (this *LogConfig) Build() *log.Config {
config.ErrorLogLevel = log.LogLevel_Error
case "none":
config.ErrorLogType = log.LogType_None
config.AccessLogType = log.LogType_None
default:
config.ErrorLogLevel = log.LogLevel_Warning
}