Hide timestamp from logs #1366

Closed
opened 2024-09-10 14:48:28 +00:00 by fyrchik · 0 comments
Owner

So I look at the journald logs and see 2 timestamps:

сен 10 14:45:16 softrock-node2 frostfs-node[54663]: 2024-09-10T14:45:16.029Z        debug        get/get.go:94        serving request...        {"component": "Object.Get service", "request": "HEAD", "address": "81qubjPY6CBWpLXzJyU3R7hp7mtcTPvcLsaNXnYfDVM/9SoxneS9c8KCDFvh8uEthDz7SGVn4M2ZkwdpkJqaqLXQ", "raw": false, "local": true, "with session": false, "with bearer": false}

Why have 2 when we can have one?
We can make this configurable with logger.timestamp: no/yes/auto, where auto enables timestamps only when stdout is a terminal.
See https://github.com/nspcc-dev/neo-go/issues/3358

My opinion is to make no the default (somewhat breaks backward compatibility, but acceptable) and have only 2 options, no need to dance with auto.

So I look at the journald logs and see 2 timestamps: ``` сен 10 14:45:16 softrock-node2 frostfs-node[54663]: 2024-09-10T14:45:16.029Z debug get/get.go:94 serving request... {"component": "Object.Get service", "request": "HEAD", "address": "81qubjPY6CBWpLXzJyU3R7hp7mtcTPvcLsaNXnYfDVM/9SoxneS9c8KCDFvh8uEthDz7SGVn4M2ZkwdpkJqaqLXQ", "raw": false, "local": true, "with session": false, "with bearer": false} ``` Why have 2 when we can have one? We can make this configurable with `logger.timestamp: no/yes/auto`, where auto enables timestamps only when stdout is a terminal. See https://github.com/nspcc-dev/neo-go/issues/3358 My opinion is to make `no` the default (somewhat breaks backward compatibility, but acceptable) and have only 2 options, no need to dance with `auto`.
fyrchik added the
frostfs-ir
frostfs-node
good first issue
labels 2024-09-10 14:48:28 +00:00
a-savchuk was assigned by fyrchik 2024-09-12 07:49:46 +00:00
fyrchik added the
observability
label 2024-09-12 07:49:56 +00:00
fyrchik added this to the v0.43.0 milestone 2024-09-13 13:13:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1366
No description provided.