Opened 3 years ago

Closed 3 years ago

#1436 closed enhancement (fixed)

Always add timestamp to json

Reported by: Michael Schneider Owned by: Christian Franke
Priority: minor Milestone: Release 7.3
Component: smartctl Version:
Keywords: Cc:

Description

json version, smartctl information, messages and exist status is always added to json but the timestamp of the activity isn't there. Having a timestamp available in every json output will simplify the communication with the interface.

The suggested solution is to move the population of the timestamp into jglb from ataprint.cpp, scsiprint.cpp and nvmeprint.cpp into main.

A patch is attached but requires testing.

Attachments (1)

alwaystimestamp.patch (2.4 KB ) - added by Michael Schneider 3 years ago.
Patch based on #5199

Download all attachments as: .zip

Change History (5)

by Michael Schneider, 3 years ago

Attachment: alwaystimestamp.patch added

Patch based on #5199

in reply to:  description comment:1 by Michael Schneider, 3 years ago

Corrected version:
json version, smartctl information, messages and exist status is always added to json but the timestamp of the activity isn't there. Having a timestamp available in every json output will simplify the communication with the interface.

The suggested solution is to move the timestamp from ataprint.cpp, scsiprint.cpp and nvmeprint.cpp into main.

A patch is attached but requires testing.

comment:2 by Christian Franke, 3 years ago

Milestone: undecidedRelease 7.3

Makes sense, thanks.

comment:3 by Christian Franke, 3 years ago

Owner: set to Christian Franke
Status: newaccepted

I will use a slightly different approach which makes sure that timestamps in a --json=o output always match.

comment:4 by Christian Franke, 3 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.