Ensure that log messages are sent correctly (per wire format). #5743

Merged
merged 1 commit into from Jun 30, 2016

Conversation

Projects
None yet
2 participants
Contributor

ericsnowcurrently commented Jun 30, 2016

We must be sure that the wire format syslog messages we send match the specification (see below). This patch does so.


(see https://docs.google.com/document/d/1Dnn85mR8gUqmu9WhPtOMjLS4LftMbnCgtS-3dNomyNw/)

Syslog messages will be sent using the RFC 5424 message format (see more on the syslog protocol below). We make use of the structured data facility defined in the more recent RFC.

The value of "priority" is set by whether a log or audit message is being recorded.

Log Messages:
The facility code will be 1 (user level message). Severity will be mapped as follows:
Juju ERROR = Error (3)
Juju WARNING = Warning (4)
Juju INFO = Informational (6)
Juju DEBUG = Debug (7)
Juju TRACE = Debug (7)

Messages will use structured data to record relevant environment and user action parameters. Key pair definitions will be:

SDID: origin
enterpriseId: 28978 (Canonical, Ltd.)
software: jujud
swVersion:

SDID: model@28978
controller-uuid:
model-uuid:

SDID: log@28978
source: :
module: <the name of the source “module”>

Example log (error) message

<11>1 2016-02-28T09:57:10.804642398-05:00 172.12.3.1 juju - - [origin enterpriseId="28978" software="jujud" "2.0.0"] [model@28978 controller-uuid="deadbeef" model-uuid="deadbeef"] [log@28978 source-file="provider/ec2/storage.go" source-line="60"] Could not initialise machine block storage

(Review request: http://reviews.vapour.ws/r/5189/)

Contributor

ericsnowcurrently commented Jun 30, 2016

$$JFDI$$

Contributor

jujubot commented Jun 30, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit dceba89 into juju:master Jun 30, 2016

@ericsnowcurrently ericsnowcurrently deleted the ericsnowcurrently:logging-feature-test branch Jun 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment