Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
a84ddcf9
Commit
a84ddcf9
authored
Nov 15, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(elog/Event)
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
6245f0c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
util/elog/log.go
util/elog/log.go
+16
-0
No files found.
util/elog/log.go
View file @
a84ddcf9
...
...
@@ -12,8 +12,24 @@ func init() {
SetupLogging
()
}
// EventLogger extends the StandardLogger interface to allow for log items
// containing structured metadata
type
EventLogger
interface
{
StandardLogger
// Event merges structured data from the provided inputs into a single
// machine-readable log event.
//
// If the context contains metadata, a copy of this is used as the base
// metadata accumulator.
//
// If one or more loggable objects are provided, these are deep-merged into base blob.
//
// Next, the event name is added to the blob under the key "event". If
// the key "event" already exists, it will be over-written.
//
// Finally the timestamp and package name are added to the accumulator and
// the metadata is logged.
Event
(
ctx
context
.
Context
,
event
string
,
m
...
Loggable
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment