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 confusingpull/1081/merge
parent
a428042899
commit
3fa82ad29e
|
@ -16,7 +16,7 @@ bind-address = "0.0.0.0"
|
||||||
reporting-disabled = false
|
reporting-disabled = false
|
||||||
|
|
||||||
[logging]
|
[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"
|
level = "info"
|
||||||
file = "influxdb.log" # stdout to log to standard out, or syslog facility
|
file = "influxdb.log" # stdout to log to standard out, or syslog facility
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,18 @@ import (
|
||||||
func setupLogging(loggingLevel, logFile string) {
|
func setupLogging(loggingLevel, logFile string) {
|
||||||
level := log.DEBUG
|
level := log.DEBUG
|
||||||
switch loggingLevel {
|
switch loggingLevel {
|
||||||
case "trace":
|
case "fine":
|
||||||
level = log.TRACE
|
level = log.FINE
|
||||||
|
case "debug":
|
||||||
|
level = log.DEBUG
|
||||||
case "info":
|
case "info":
|
||||||
level = log.INFO
|
level = log.INFO
|
||||||
case "warn":
|
case "warn":
|
||||||
level = log.WARNING
|
level = log.WARNING
|
||||||
case "error":
|
case "error":
|
||||||
level = log.ERROR
|
level = log.ERROR
|
||||||
|
default:
|
||||||
|
log.Error("Unknown log level %s. Defaulting to DEBUG", loggingLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Global = make(map[string]*log.Filter)
|
log.Global = make(map[string]*log.Filter)
|
||||||
|
|
|
@ -96,7 +96,7 @@ func (pi *PointIterator) Next() {
|
||||||
// if the value is nil or doesn't match the point's timestamp and sequence number
|
// if the value is nil or doesn't match the point's timestamp and sequence number
|
||||||
// then skip it
|
// then skip it
|
||||||
if rcv.value == nil || rcv.time != next.time || rcv.sequence != next.sequence {
|
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}
|
pi.point.Values[i] = &protocol.FieldValue{IsNull: &TRUE}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ func (pi *PointIterator) Close() {
|
||||||
func (pi *PointIterator) getIteratorNextValue() error {
|
func (pi *PointIterator) getIteratorNextValue() error {
|
||||||
for i, it := range pi.itrs {
|
for i, it := range pi.itrs {
|
||||||
if pi.rawColumnValues[i].value != nil {
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ func (pi *PointIterator) getIteratorNextValue() error {
|
||||||
if err := it.Error(); err != nil {
|
if err := it.Error(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log4go.Trace("Iterator isn't valid, skipping")
|
log4go.Debug("Iterator isn't valid, skipping")
|
||||||
continue
|
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 we ran out of points for this field go to the next iterator
|
||||||
if sk.id != pi.fields[i].Id {
|
if sk.id != pi.fields[i].Id {
|
||||||
log4go.Trace("Different id reached")
|
log4go.Debug("Different id reached")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the point is outside the query start and end time
|
// if the point is outside the query start and end time
|
||||||
if sk.time().Before(pi.startTime) || sk.time().After(pi.endTime) {
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,9 +206,9 @@ func (self *AggregatorEngine) aggregateValuesForSeries(series *protocol.Series)
|
||||||
// update the state of the given group
|
// update the state of the given group
|
||||||
node := seriesState.trie.GetNode(group)
|
node := seriesState.trie.GetNode(group)
|
||||||
var err error
|
var err error
|
||||||
log4go.Trace("Aggregating for group %v", group)
|
log4go.Debug("Aggregating for group %v", group)
|
||||||
for idx, aggregator := range self.aggregators {
|
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)
|
node.states[idx], err = aggregator.AggregatePoint(node.states[idx], point)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|
Loading…
Reference in New Issue