File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
6
6
## [ unreleased]
7
7
8
+ ## [ 4.17.0]
9
+
8
10
- Correct ` source_code_uri ` URL
11
+ - Add : notime as a time_format for Formatters
12
+ - Fix #316 : syslog messages contains two timestamps
9
13
- Add appender for CloudWatch Logs
10
14
- NR Integration: Ensures key/values are not nested under ` messages `
11
15
- NR Integration: Ensures structures are built for all nested json (I.E build an actual object instead of doing ` span.id ` as the key)
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def flush
215
215
def default_formatter
216
216
if protocol == :syslog
217
217
# Format is text output without the time
218
- SemanticLogger ::Formatters ::Default . new ( time_format : nil )
218
+ SemanticLogger ::Formatters ::Default . new ( time_format : :notime )
219
219
else
220
220
SemanticLogger ::Formatters ::Syslog . new ( facility : facility , level_map : level_map , max_size : max_size )
221
221
end
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class Base
23
23
# See Time#strftime for the format of this string.
24
24
# :iso_8601 Outputs an ISO8601 Formatted timestamp.
25
25
# :ms Output in miliseconds since epoch.
26
+ # :notime Returns an empty string for time ( no time is output ).
26
27
# Default: '%Y-%m-%d %H:%M:%S.%<precision>N'
27
28
# log_host: [Boolean]
28
29
# Whether or not to include hostname in logs
@@ -81,7 +82,7 @@ def format_time(time)
81
82
time
82
83
when :seconds
83
84
time . to_f
84
- when nil
85
+ when :notime
85
86
""
86
87
else
87
88
time . strftime ( time_format )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class SyslogTest < Minitest::Test
14
14
syslog_appender . debug "AppenderSyslogTest log message"
15
15
end
16
16
end
17
- assert_match ( /D (.*?) SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/ , message )
17
+ assert_match ( /^ D (.*?) SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/ , message )
18
18
end
19
19
20
20
it "handle remote syslog over TCP" do
You can’t perform that action at this time.
0 commit comments