You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an option --test to mloginfo for the purpose of this reproduction:
Add the attached test_section.py file to the mtools/loginfo/sections folder.
Insert a line into the top of mtools/mloginfo/sections/__init__.py that looks like from .test_section import TestSection.
Run mloginfo --test on mtools/test/logfiles/sharding_360_mongos.log as an example. All the client metadata log lines that result in logevent.clientmetadata returning nothing are prefixed with "ERROR".
Run mloginfo --test on another sample log file (attached) called mongod_4.2.11_clients.log. All the client metadata log lines parse successfully.
Issue
It seems like there's a bug in mtools/util/logevent.py in this part of the code:
There are certain client metadata log lines (4.2 and earlier) for which
logevent.clientmetadata
returns nothing.Expected behavior
Example Log Line:
Result of
logevent.clientmetadata
:Actual/current behavior
Example Log Line (impacted by this bug):
Result of
logevent.clientmetadata
: NoneSteps to reproduce the actual/current behavior
Add an option
--test
tomloginfo
for the purpose of this reproduction:test_section.py
file to themtools/loginfo/sections
folder.mtools/mloginfo/sections/__init__.py
that looks likefrom .test_section import TestSection
.Run
mloginfo --test
onmtools/test/logfiles/sharding_360_mongos.log
as an example. All the client metadata log lines that result inlogevent.clientmetadata
returning nothing are prefixed with "ERROR".Run
mloginfo --test
on another sample log file (attached) calledmongod_4.2.11_clients.log
. All the client metadata log lines parse successfully.Issue
It seems like there's a bug in
mtools/util/logevent.py
in this part of the code:Environment
The text was updated successfully, but these errors were encountered: