4 ms·
Ok debug logging into a table is probably one of the best improvements to logging I've seen in a long time. I kinda want this in every programming language. The
by azinman2 12y ago
Ok debug logging into a table is probably one of the best improvements to logging I've seen in a long time. I kinda want this in every programming language. There are so many useful things about it, especially the ability to then randomly sort it at will!
- jamii 12y agoYou might enjoy http://db.cs.berkeley.edu/papers/eurosys10-boom.pdf http://db.cs.berkeley.edu/papers/eurosys10-boom.pdf . They put everything into tables (debug logs, profiling info, server state, monitoring statistics, messages sent/received etc) and then debug the system by writing queries on the tables.
- gioele 12y agocat /var/log/syslog | grep -i 'problem' is also a query on the `/var/log/syslog` "database". What would be really cool is a RDBMS where the single pieces of data in the cells are related to each other. For example the user IDs in the authentication log could be matched with the IDs present in the request log.
- melling 12y agoWhy add the extra cat command? grep -i 'problem' /var/log/syslog
- coriny 12y agoHe's after this weeks "Useless use of cat" award: http://www.smallo.ruhr.de/award.html#cat http://www.smallo.ruhr.de/award.html#cat Good to see there's still some competitors out there.
- zem 12y agopipelines read better left to right
- Hello71 12y ago</var/log/syslog grep -i 'problem'
- stonogo 12y agobecause invariably you're going to want to recall this command from history and insert "grep -v HostnameIDontCareAbout" between the cat and the grep. or you're going to want to replace "grep -i 'problem'" with "awk '/problem/ { print $3 }". or you're going to want to do both. people whine about 'useless use of cat' like it's still 1982, but the fact is that it's convenient for iterative development of a pipeline in situ and it costs nothing.
- diltonm 12y agoApache Drill lets you search logs using column base requirements. https://cwiki.apache.org/confluence/display/DRILL/Querying+a+File+System https://cwiki.apache.org/confluence/display/DRILL/Querying+a... It doesn't work on files with no extension yet or at least there's a bug report on it: https://issues.apache.org/jira/browse/DRILL-1320?filter=-3 https://issues.apache.org/jira/browse/DRILL-1320?filter=-3
- niutech 12y agoHave a look at lnav: http://tstack.github.io/lnav/ http://tstack.github.io/lnav/
- onion2k 12y agoIt's been available in Chrome for a year and a half.. https://plus.google.com/u/0/+AddyOsmani/posts/PmTC5wwJVEc https://plus.google.com/u/0/+AddyOsmani/posts/PmTC5wwJVEc ..this is actually one of the things that's most annoying about web dev - each browser has some really cool stuff for debugging, but none of them has everything. The Firefox team are addressing that though - https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ https://hacks.mozilla.org/2014/09/firefox-tools-adapter/ - Firefox nightly can connect to Chrome's debugging interface so you can use Firefox's toolset to debug a page in Chrome. Which is insanely cool.
- LukeB_UK 12y agoI was under the impression that it only connects to the debugging interface on chrome for android. Has this changed?
- dubcanada 12y ago? console.table (and fancy console.log html stuff) has been in Chrome and WebKit since 2012.
- mbrubeck 12y agoYes, that's correct: The "Firefox Tools Adapter" targets Chrome for Android and Safari for iOS: https://developer.mozilla.org/en-US/docs/Tools/Firefox_Tools_Adapter https://developer.mozilla.org/en-US/docs/Tools/Firefox_Tools...
- phlsa 12y agoYou can also debug desktop Chrome with the devtools adapter. Its shown in the video on this page: https://hacks.mozilla.org/2014/09/firefox-tools-adapter https://hacks.mozilla.org/2014/09/firefox-tools-adapter
- netghost 12y agoI think even IE11 supports it.