Project

General

Profile

Actions

Idea #10473

closed

[Keepstore] Log requests in JSON format

Added by Tom Morris over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
0.5

Description

Switch request logging log format to JSON to allow easier parsing and post-processing.

This line in source:services/keepstore/logging_router.go#L75

    log.Printf("[%s] %s %s %d %.6fs %.6fs %.6fs %d %d \"%s\"", req.RemoteAddr, req.Method, req.URL.Path[1:], req.ContentLength, tTotal.Seconds(), tLatency.Seconds(), tResponse.Seconds(), resp.Status, resp.Length, statusText)

...should log some JSON to a logger that doesn't use a prefix.

Add an RFC3339 timestamp, too.


Subtasks 2 (0 open2 closed)

Task #10548: logrusResolvedTom Clegg11/07/2016Actions
Task #10507: Review 10473-keepstore-logrusResolvedTom Clegg11/07/2016Actions
Actions

Also available in: Atom PDF