4 ms·
DOH! Sharp eye :) The original was: TARGET_FILE=~tomcat/logs/access.log tail \ --lines 1 ${TARGET_FILE} | \ column \ --json \ --t
by desktopninja 4y ago
DOH! Sharp eye :) The original was:
TARGET_FILE=~tomcat/logs/access.log
tail \
--lines 1 ${TARGET_FILE} | \
column \
--json \
--table-name ACCESS_LOG \
--table-columns $(seq --separator=, 1 48)
And the story behind it is a bit silly but memorable. To keep things fun, our ENG team does "left field challenges" and this one was "using only core bin tools, how would you get the field numbers and field values of the tomcat access log file in json format". Its memorable because not long after the code was posted in the ENG chat, we had a PRD incident and some team members used it and found it useful.