Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pkg/runtime: enabled console logger earlier to catch errors.

  • Loading branch information...
commit daaaf646b98f95f232bc598b2a1df52cb7e944e4 1 parent 327ca51
@tav authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/amp/pkg/runtime/runtime.go
View
9 src/amp/pkg/runtime/runtime.go
@@ -219,6 +219,11 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string) (bool,
Exit(0)
}
+ // Enable the console logger early.
+ if !*noConsoleLog {
+ log.AddConsoleLogger()
+ }
+
// Assume the parent directory of the config as the instance directory.
if len(args) >= 1 {
configPath, err = filepath.Abs(filepath.Clean(args[0]))
@@ -278,10 +283,6 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string) (bool,
Error("Unknown log rotation format %q", *logRotate)
}
- if !*noConsoleLog {
- log.AddConsoleLogger()
- }
-
_, err = log.AddFileLogger(name, logPath, rotate, log.InfoLog)
if err != nil {
Error("Couldn't initialise logfile: %s", err)
Please sign in to comment.
Something went wrong with that request. Please try again.