-
Notifications
You must be signed in to change notification settings - Fork 97
JSON log format #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
JSON log format #611
Conversation
Signed-off-by: Jarno Elovirta <[email protected]>
Signed-off-by: Jarno Elovirta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start, with a few minor suggestions.
Not sure we need the list of fields in the command overview, but probably makes sense to add those to the logging topic and Xref there from the args topic.
<parmname>--logger</parmname>=<varname>json</varname> | ||
</pt> | ||
<pd> | ||
<p>Generate a strucured log in JSON format. Each log message generated a JSON object on its own line. JSON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>Generate a strucured log in JSON format. Each log message generated a JSON object on its own line. JSON | |
<p>Generate a structured log in JSON format. Each log message generates a JSON object on its own line. JSON |
@@ -56,6 +56,11 @@ | |||
<parmname>--logfile</parmname>=<varname>file</varname> and specify the path to the log file.</p> | |||
<p>Unless an absolute path is specified, the value will be interpreted relative to the current | |||
directory.</p></li> | |||
<li>Use <cmdname>dita</cmdname> | |||
<parmname>--logger</parmname>=<varname>json</varname> to generate a strucured log in JSON format. Each log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<parmname>--logger</parmname>=<varname>json</varname> to generate a strucured log in JSON format. Each log | |
<parmname>--logger</parmname>=<varname>json</varname> to generate a structured log in JSON format. Each log |
<parmname>--logger</parmname>=<varname>json</varname> to generate a strucured log in JSON format. Each log | ||
message generates a JSON object on its own line. | ||
<p>If log is written to a file with <parmname>--logfile</parmname>, the log will be generated as a JSON | ||
array where each log message is JSON object as an array item.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
array where each log message is JSON object as an array item.</p></li> | |
array where each log message is a JSON object as an array item.</p></li> |
log disabled colored output.</p> | ||
<p>If log is written to a file with <parmname | ||
>--logfile</parmname>, the log will be generated as a JSON array | ||
where each log message is JSON object as an array item.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where each log message is JSON object as an array item.</p> | |
where each log message is a JSON object as an array item.</p> |
</pt> | ||
<pd> | ||
<p>Generate a strucured log in JSON format. Each log message generated a JSON object on its own line. JSON | ||
log disabled colored output.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log disabled colored output.</p> | |
logging disables colored output.</p> |
Description
Document strucutured log (JSON).
Fields in every log message
level
— log levelFATAL
,ERROR
,WARN
,INFO
,DEBUG
, orTRACE
timestamp
— message timestamp in ISO datatime formatOptional fields that are in some messages depending on message type
code
— message IDduration
— duration of build/target/task in millisecondsline
— line number in the source documentlocation
— source document that caused the log messagemsg
— message textrow
— row number in the source documentstacktrace
— error Java stack tracetarget
— Ant target nametask
— Ant task nameMotivation and Context
Documents dita-ot/dita-ot#4581
How Has This Been Tested?
Type of Changes