Use FINE instead of TRACE when fine logging

It turns out TRACE is a higher logging level than DEBUG which doesn't
make much sense and is confusing. We can use FINE to achieve the same
thing and it's descriptive and less confusing
pull/1081/merge
John Shahid 2014-10-30 13:42:45 -04:00
parent a428042899
commit 3fa82ad29e
4 changed files with 14 additions and 10 deletions

View File

@ -16,7 +16,7 @@ bind-address = "0.0.0.0"
reporting-disabled = false
[logging]
# logging level can be one of "debug", "info", "warn" or "error"
# logging level can be one of "fine", "debug", "info", "warn" or "error"
level = "info"
file = "influxdb.log" # stdout to log to standard out, or syslog facility

View File

@ -21,14 +21,18 @@ import (
func setupLogging(loggingLevel, logFile string) {
level := log.DEBUG
switch loggingLevel {
case "trace":
level = log.TRACE
case "fine":
level = log.FINE
case "debug":
level = log.DEBUG
case "info":
level = log.INFO
case "warn":
level = log.WARNING
case "error":
level = log.ERROR
default:
log.Error("Unknown log level %s. Defaulting to DEBUG", loggingLevel)
}
log.Global = make(map[string]*log.Filter)

View File

@ -96,7 +96,7 @@ func (pi *PointIterator) Next() {
// if the value is nil or doesn't match the point's timestamp and sequence number
// then skip it
if rcv.value == nil || rcv.time != next.time || rcv.sequence != next.sequence {
log4go.Trace("rcv = %#v, next = %#v", rcv, next)
log4go.Debug("rcv = %#v, next = %#v", rcv, next)
pi.point.Values[i] = &protocol.FieldValue{IsNull: &TRUE}
continue
}
@ -164,7 +164,7 @@ func (pi *PointIterator) Close() {
func (pi *PointIterator) getIteratorNextValue() error {
for i, it := range pi.itrs {
if pi.rawColumnValues[i].value != nil {
log4go.Trace("Value in iterator isn't nil, skipping")
log4go.Debug("Value in iterator isn't nil, skipping")
continue
}
@ -172,7 +172,7 @@ func (pi *PointIterator) getIteratorNextValue() error {
if err := it.Error(); err != nil {
return err
}
log4go.Trace("Iterator isn't valid, skipping")
log4go.Debug("Iterator isn't valid, skipping")
continue
}
@ -184,13 +184,13 @@ func (pi *PointIterator) getIteratorNextValue() error {
// if we ran out of points for this field go to the next iterator
if sk.id != pi.fields[i].Id {
log4go.Trace("Different id reached")
log4go.Debug("Different id reached")
continue
}
// if the point is outside the query start and end time
if sk.time().Before(pi.startTime) || sk.time().After(pi.endTime) {
log4go.Trace("Outside time range: %s, %s", sk.time(), pi.startTime)
log4go.Debug("Outside time range: %s, %s", sk.time(), pi.startTime)
continue
}

View File

@ -206,9 +206,9 @@ func (self *AggregatorEngine) aggregateValuesForSeries(series *protocol.Series)
// update the state of the given group
node := seriesState.trie.GetNode(group)
var err error
log4go.Trace("Aggregating for group %v", group)
log4go.Debug("Aggregating for group %v", group)
for idx, aggregator := range self.aggregators {
log4go.Trace("Aggregating value for %T for group %v and state %v", aggregator, group, node.states[idx])
log4go.Debug("Aggregating value for %T for group %v and state %v", aggregator, group, node.states[idx])
node.states[idx], err = aggregator.AggregatePoint(node.states[idx], point)
if err != nil {
return false, err