Rename Record.Id to Record.ID
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f9e84f..4b7d233 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
* Make eg. `Info` and `Infof` do different things. You want to change all calls
to `Info` with a string format go to `Infof` etc. In many cases, `go vet` will
guide you.
+* `Id` in `Record` is now called `ID`
## 1.0.0 (2013-02-21)
diff --git a/format.go b/format.go
index 307e2f5..1b11655 100644
--- a/format.go
+++ b/format.go
@@ -240,7 +240,7 @@
}
testFmt := "hello %s"
r := &Record{
- Id: 12345,
+ ID: 12345,
Time: t,
Module: "logger",
Args: []interface{}{"go"},
@@ -282,7 +282,7 @@
v = r.Level
break
case fmtVerbID:
- v = r.Id
+ v = r.ID
break
case fmtVerbPid:
v = pid
diff --git a/logger.go b/logger.go
index 0f4bff2..535ed9b 100644
--- a/logger.go
+++ b/logger.go
@@ -41,7 +41,7 @@
// was created, an increasing id, filename and line and finally the actual
// formatted log line.
type Record struct {
- Id uint64
+ ID uint64
Time time.Time
Module string
Level Level
@@ -147,7 +147,7 @@
// Create the logging record and pass it in to the backend
record := &Record{
- Id: atomic.AddUint64(&sequenceNo, 1),
+ ID: atomic.AddUint64(&sequenceNo, 1),
Time: timeNow(),
Module: l.Module,
Level: lvl,
diff --git a/logger_test.go b/logger_test.go
index 81d7320..b9f7fe7 100644
--- a/logger_test.go
+++ b/logger_test.go
@@ -20,8 +20,8 @@
log := MustGetLogger("test")
log.Debug("test")
- if MemoryRecordN(backend, 0).Id != 0 {
- t.Errorf("Unexpected sequence no: %v", MemoryRecordN(backend, 0).Id)
+ if MemoryRecordN(backend, 0).ID != 0 {
+ t.Errorf("Unexpected sequence no: %v", MemoryRecordN(backend, 0).ID)
}
}