[jboss-jira] [JBoss JIRA] (WFCORE-4364) Allow management audit logging to write JSON log messages to stdout
James Perkins (Jira)
issues at jboss.org
Fri Mar 8 16:41:00 EST 2019
[ https://issues.jboss.org/browse/WFCORE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705944#comment-13705944 ]
James Perkins commented on WFCORE-4364:
---------------------------------------
Looking more at the data it's going to have to be fully restructured. The date looks like an object. It's probably going to have to look more like:
{code}
{
"timestamp" : "2019-03-08 13:29:49"
"type" : "core",
"r/o" : false,
"booting" : false,
"version" : "8.0.1.CR1-SNAPSHOT",
"user" : "$local",
"domainUUID" : null,
"access" : "NATIVE",
"remote-address" : "localhost/127.0.0.1",
"success" : true,
"opAddress" : "/subsystem=logging/json-formatter=json",
"op" : "remove",
"caller-type" : "user",
"access-mechanism" : "NATIVE"
}
{code}
Note we need to determine what values can end up in the {{operation-headers}} object.
> Allow management audit logging to write JSON log messages to stdout
> -------------------------------------------------------------------
>
> Key: WFCORE-4364
> URL: https://issues.jboss.org/browse/WFCORE-4364
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Logging, Management
> Reporter: James Perkins
> Assignee: James Perkins
> Priority: Major
>
> Management audit logging can already log messages in JSON format. However these can only be written to a file or a syslog server. We need the ability for these messages to be written to {{stdout}}. This is useful for containers like OpenShift which consume the {{stdout}} data to feed to log aggregators.
> Example Output:
> {code}
> 2019-03-08 13:29:49 - {
> "type" : "core",
> "r/o" : false,
> "booting" : false,
> "version" : "8.0.1.CR1-SNAPSHOT",
> "user" : "$local",
> "domainUUID" : null,
> "access" : "NATIVE",
> "remote-address" : "localhost/127.0.0.1",
> "success" : true,
> "ops" : [{
> "address" : [
> {
> "subsystem" : "logging"
> },
> {
> "json-formatter" : "json"
> }
> ],
> "operation" : "remove",
> "operation-headers" : {
> "caller-type" : "user",
> "access-mechanism" : "NATIVE"
> }
> }]
> }
> {code}
> Note for a log aggregator the complex {{ops}} attribute can be an issue. We may need to find a better way to log that. If possibly maybe convert it into a CLI command.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list