Log timestamp

This commit is contained in:
Andy Wang 2020-12-27 20:27:04 +00:00
parent d1b05ee9e5
commit 57bb437802
No known key found for this signature in database
GPG Key ID: 181B49F9F38F3374
2 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,9 @@ func main() {
log.Info("Starting standalone mode")
}
log.SetFormatter(&log.TextFormatter{
FullTimestamp: true,
})
lvl, err := log.ParseLevel(*verbosity)
if err != nil {
log.Fatal(err)

View File

@ -72,6 +72,10 @@ func main() {
var pluginMode bool
log.SetFormatter(&log.TextFormatter{
FullTimestamp: true,
})
if os.Getenv("SS_LOCAL_HOST") != "" && os.Getenv("SS_LOCAL_PORT") != "" {
pluginMode = true
config = os.Getenv("SS_PLUGIN_OPTIONS")