build/loglevel: add build flag hooks for log levels

This commit is contained in:
Conner Fromknecht 2018-09-20 03:17:45 -07:00
parent 738ba45bcf
commit 4ea1a40a88
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
8 changed files with 48 additions and 0 deletions

View 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
View File

@ -0,0 +1,6 @@
// +build dev,debug
package build
// LogLevel specifies a debug log level.
var LogLevel = "debug"

View 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
View 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
View 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
View 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
View 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
View File

@ -0,0 +1,6 @@
// +build dev,warn
package build
// LogLevel specifies a warning log level.
var LogLevel = "warn"