-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I noticed that
a) leading tabs \t are removed from multi-line messages (and possibly single line - not tested)
b) multi-line messages are split by new line \n but I think the results should be one item in the results list per message, not per line. In other words the text string of each log message should not be altered by the .find method. If people want to strip out whitespace after receiving the original string then that's up to them, but I think we need to give them the option because sometimes the newline formatting will be important.
Here's the test I think we need to pass, which I've added to test_log2d.py:
@create_mylog
def test_find_multiline():
Log.mylog.info("Three line message\n\twith more data on this line\n\t\tand also on this line too!")
r = mylog.find()
assert len(r) == 2
assert r.count("\t") == 3
assert r.count("\n") == 2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working