File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1010
1111# the "message" attribute is saved on the record object by a Formatter
1212RECORD_VARS .add ('message' )
13+ RECORD_VARS .add ('trans_id' )
14+ RECORD_VARS .add ('log_id' )
1315
1416
1517class LogMsg (JSONObject ):
1618 def __init__ (self ):
19+ self .ID = None
1720 self .Msg = None
1821 self .data = None
1922 self .Ex = None # a StackifyError object
@@ -25,10 +28,12 @@ def __init__(self):
2528 self .SrcLine = None
2629
2730 def from_record (self , record ):
31+ self .ID = hasattr (record , 'log_id' ) and record .log_id or None
2832 self .Msg = record .getMessage ()
2933 self .Th = record .threadName or record .thread
3034 self .EpochMs = int (record .created * 1000 )
3135 self .Level = record .levelname
36+ self .TransID = hasattr (record , 'trans_id' ) and record .trans_id or None
3237 self .SrcMethod = record .funcName
3338 self .SrcLine = record .lineno
3439
Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ def test_send_log_group(self):
133133 self .assertEqual (group .CDID , client .device_id )
134134 self .assertEqual (group .CDAppID , client .device_app_id )
135135 self .assertEqual (group .AppNameID , client .app_name_id )
136- self .assertEqual (group .ServerName , client .device_alias )
137136
138137 @patch ('requests.post' )
139138 def test_post_arguments (self , post ):
You can’t perform that action at this time.
0 commit comments