Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit daaaf646b98f95f232bc598b2a1df52cb7e944e4 1 parent 327ca51
authored December 02, 2011

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  src/amp/pkg/runtime/runtime.go
9  src/amp/pkg/runtime/runtime.go
@@ -219,6 +219,11 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string) (bool,
219 219
 		Exit(0)
220 220
 	}
221 221
 
  222
+	// Enable the console logger early.
  223
+	if !*noConsoleLog {
  224
+		log.AddConsoleLogger()
  225
+	}
  226
+
222 227
 	// Assume the parent directory of the config as the instance directory.
223 228
 	if len(args) >= 1 {
224 229
 		configPath, err = filepath.Abs(filepath.Clean(args[0]))
@@ -278,10 +283,6 @@ func DefaultOpts(name string, opts *optparse.OptionParser, argv []string) (bool,
278 283
 		Error("Unknown log rotation format %q", *logRotate)
279 284
 	}
280 285
 
281  
-	if !*noConsoleLog {
282  
-		log.AddConsoleLogger()
283  
-	}
284  
-
285 286
 	_, err = log.AddFileLogger(name, logPath, rotate, log.InfoLog)
286 287
 	if err != nil {
287 288
 		Error("Couldn't initialise logfile: %s", err)

0 notes on commit daaaf64

Please sign in to comment.
Something went wrong with that request. Please try again.