4 ms·
For trimming logs, I load the whole log file into Python's REPL and repeatedly add >>> l = [x for x in l if ...] lines. I imagine there's a better way.
by wizzwizz4 5y ago
For trimming logs, I load the whole log file into Python's REPL and repeatedly add
>>> l = [x for x in l if ...]
lines. I imagine there's a better way.
- icedchai 5y agoMaybe try "grep -v" ?
- spaetzleesser 5y agoI try to produce many small log files by hour or day. This makes it pretty easy to discard old logs or reduce the amount of data you have to look at if you know the problem was within a certain timeframe.