build/loglevel: add build flag hooks for log levels
This commit is contained in:
parent
738ba45bcf
commit
4ea1a40a88
6
build/loglevel_critical.go
Normal file
6
build/loglevel_critical.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,critical
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies a critical log level.
|
||||
var LogLevel = "critical"
|
6
build/loglevel_debug.go
Normal file
6
build/loglevel_debug.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,debug
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies a debug log level.
|
||||
var LogLevel = "debug"
|
6
build/loglevel_default.go
Normal file
6
build/loglevel_default.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build !info,!debug,!trace,!warn,!error,!critical,!off
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies a default log level of info.
|
||||
var LogLevel = "info"
|
6
build/loglevel_error.go
Normal file
6
build/loglevel_error.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,error
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies an error log level.
|
||||
var LogLevel = "error"
|
6
build/loglevel_info.go
Normal file
6
build/loglevel_info.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,info
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies an info log level.
|
||||
var LogLevel = "info"
|
6
build/loglevel_off.go
Normal file
6
build/loglevel_off.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,off
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies an off log level.
|
||||
var LogLevel = "off"
|
6
build/loglevel_trace.go
Normal file
6
build/loglevel_trace.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,trace
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies a trace log level.
|
||||
var LogLevel = "trace"
|
6
build/loglevel_warn.go
Normal file
6
build/loglevel_warn.go
Normal file
@ -0,0 +1,6 @@
|
||||
// +build dev,warn
|
||||
|
||||
package build
|
||||
|
||||
// LogLevel specifies a warning log level.
|
||||
var LogLevel = "warn"
|
Loading…
Reference in New Issue
Block a user