26 lines
538 B
Go
26 lines
538 B
Go
|
package main
|
||
|
|
||
|
import "flag"
|
||
|
|
||
|
var (
|
||
|
flagPrettyPrint *bool = flag.Bool(
|
||
|
"pretty",
|
||
|
false,
|
||
|
"If set, pretty prints logging entries which would be json objects otherwise",
|
||
|
)
|
||
|
flagConfigFile *string = flag.String(
|
||
|
"config",
|
||
|
"config.toml",
|
||
|
"Location of the config file. Defaults to \"config.toml\"",
|
||
|
)
|
||
|
flagLogLevel *string = flag.String(
|
||
|
"loglevel",
|
||
|
"Info",
|
||
|
"Set the logging level. Options are: Trace, Debug, Info, Warning, Error, Fatal. Capitalisation doesn't matter. Defaults to Info",
|
||
|
)
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
flag.Parse()
|
||
|
}
|