loki adjust
This commit is contained in:
@@ -59,13 +59,12 @@ func (w *LokiWriter) Write(p []byte) (n int, err error) {
|
|||||||
// A bit unsafe since we don't know what could be stored in the event
|
// A bit unsafe since we don't know what could be stored in the event
|
||||||
// but we can't access this object once passed to the multilevel writter
|
// but we can't access this object once passed to the multilevel writter
|
||||||
|
|
||||||
for k,v := range(event){
|
for k, v := range event {
|
||||||
if k != "level" && k != "time" && k != "message" {
|
if k != "level" && k != "time" && k != "message" {
|
||||||
labels[k] = v.(string)
|
labels[k] = fmt.Sprintf("%v", v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Format the timestamp in nanoseconds
|
// Format the timestamp in nanoseconds
|
||||||
timestamp := fmt.Sprintf("%d000000", time.Now().UnixNano()/int64(time.Millisecond))
|
timestamp := fmt.Sprintf("%d000000", time.Now().UnixNano()/int64(time.Millisecond))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user