Skip to content

Commit

Permalink
Add logger label to data sent to Logstash
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar committed Aug 3, 2021
1 parent 9667c53 commit 0c62a98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/LoggingELK/LogstashLogHandler+HTTPFormatting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extension LogstashLogHandler {
/// which is then sent to Logstash
struct LogstashHTTPBody: Codable {
let timestamp: String
let label: String
let loglevel: Logger.Level
let message: Logger.Message
let metadata: Logger.Metadata
Expand Down Expand Up @@ -68,7 +69,8 @@ extension LogstashLogHandler {
metadata: Logger.Metadata) -> Data? {
do {
let bodyObject = LogstashHTTPBody(
timestamp: timestamp,
timestamp: self.timestamp,
label: self.label,
loglevel: level,
message: message,
metadata: metadata
Expand Down

0 comments on commit 0c62a98

Please sign in to comment.