switching to temporarily use glog library

This commit is contained in:
Chris Lu
2013-08-08 23:57:22 -07:00
parent b27947b355
commit ed154053c8
34 changed files with 199 additions and 167 deletions

View File

@@ -557,8 +557,8 @@ func (l *loggingT) header(s severity) *buffer {
buf.twoDigits(9, minute)
buf.tmp[11] = ':'
buf.twoDigits(12, second)
buf.tmp[14] = '.'
buf.nDigits(6, 15, now.Nanosecond()/1000)
//buf.tmp[14] = '.'
//buf.nDigits(6, 15, now.Nanosecond()/1000)
buf.tmp[21] = ' '
buf.nDigits(5, 22, pid) // TODO: should be TID
buf.tmp[27] = ' '
@@ -798,7 +798,7 @@ func (sb *syncBuffer) rotateFile(now time.Time) error {
fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05"))
fmt.Fprintf(&buf, "Running on machine: %s\n", host)
fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH)
fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n")
fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss threadid file:line] msg\n")
n, err := sb.file.Write(buf.Bytes())
sb.nbytes += uint64(n)
return err