File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,18 @@ def encode(event)
140140
141141 def generate_log_from_event ( event )
142142 message = event . to_hash [ 'message' ]
143- path = event . to_hash [ 'path' ]
143+ path = event . to_hash [ 'path' ] if event . to_hash [ 'path' ]
144+ stream = event . to_hash [ 'stream' ] if event . to_hash [ 'stream' ]
144145 local_dims = JSON . parse ( event . to_hash [ 'dimensions' ] . to_s ) if
145146 event . to_hash [ 'dimensions' ]
146147 type = event . to_hash [ 'type' ] if event . to_hash [ 'type' ]
147148 cross_tenant = event . to_hash [ 'cross_tenant' ] if
148149 event . to_hash [ 'cross_tenant' ]
149150
150- log = { 'message' => message , 'dimensions' => { 'path' => path } }
151+ log = { 'message' => message , 'dimensions' => { } }
152+ path && log [ 'dimensions' ] [ 'path' ] = path
153+ stream && log [ 'dimensions' ] [ 'stream' ] = stream
154+
151155 log [ JSON_DIMS ] [ 'type' ] = type if type
152156 if local_dims
153157 begin
You can’t perform that action at this time.
0 commit comments