Added comment, ran gofmt.
authormishaz <misha@curoverse.com>
Wed, 21 Jan 2015 01:34:29 +0000 (01:34 +0000)
committerTom Clegg <tom@curoverse.com>
Fri, 13 Feb 2015 21:25:31 +0000 (16:25 -0500)
sdk/go/logger/logger.go
services/datamanager/datamanager.go

index 2a4a962a0b1c2815765c447121f1f7891cc43318..11c6b53aded962bb72f06ce5f178e6f599a2d9ae 100644 (file)
@@ -59,6 +59,7 @@ type Logger struct {
        lock   sync.Locker  // Synchronizes editing and writing
        params LoggerParams // Parameters we were given
 
+       // TODO(misha): replace lastWrite with nextWriteAllowed
        lastWrite time.Time // The last time we wrote a log entry
        modified  bool      // Has this data been modified since the last write
 
index deeea5dcb379ea9c05bee0b525f98b5f2f8bcf94..97c911d6f8112781ceb1bb92b5b381eecfc8ceba 100644 (file)
@@ -55,18 +55,18 @@ func main() {
        if arvLogger != nil {
                arvLogger.MutateLog(func(properties map[string]interface{},
                        entry map[string]interface{}) {
-                               runInfo := make(map[string]interface{})
-                               runInfo["start_time"] = time.Now()
-                               runInfo["args"] = os.Args
-                               hostname, err := os.Hostname()
-                               if err != nil {
-                                       runInfo["hostname_error"] = err.Error()
-                               } else {
-                                       runInfo["hostname"] = hostname
-                               }
-                               runInfo["pid"] = os.Getpid()
-                               properties["run_info"] = runInfo
-                       })
+                       runInfo := make(map[string]interface{})
+                       runInfo["start_time"] = time.Now()
+                       runInfo["args"] = os.Args
+                       hostname, err := os.Hostname()
+                       if err != nil {
+                               runInfo["hostname_error"] = err.Error()
+                       } else {
+                               runInfo["hostname"] = hostname
+                       }
+                       runInfo["pid"] = os.Getpid()
+                       properties["run_info"] = runInfo
+               })
 
                arvLogger.Edit()
                arvLogger.AddWriteHook(LogMemoryAlloc)