[PATCH v2 compass-ci 2/2] lib/json_logger.rb: fix that no warp cause no puts

5 Mar
2021
5 Mar
'21
5:46 p.m.
The log didn't warp before, that caused sub-fluentd can not put the log out. Signed-off-by: Li Yuanchao <lyc163mail@163.com> --- lib/json_logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/json_logger.rb b/lib/json_logger.rb index 78f95ca..2c33c2f 100644 --- a/lib/json_logger.rb +++ b/lib/json_logger.rb @@ -29,7 +29,7 @@ class JSONLogger < Logger msg = { 'message' => msg } unless msg.is_a?(Hash) logger_hash.merge!(msg) - logger_hash.to_json + logger_hash.to_json + "\n" } def initialize(logdev = STDOUT, formatter = FORMATTER) -- 2.23.0
1454
Age (days ago)
1454
Last active (days ago)
0 comments
1 participants
participants (1)
-
Li Yuanchao