Do you have any useful awk and grep scripts for parsing apache logs? [closed]

You can do pretty much anything with apache log files with awk alone. Apache log files are basically whitespace separated, and you can pretend the quotes don’t exist, and access whatever information you are interested in by column number. The only time this breaks down is if you have the combined log format and are … Read more

How to hook into action/filter call

The callbacks hooked onto ‘all’ are called prior to the callbacks for any hook (action and filters) being called. (See source) add_action( ‘all’, ‘wpse115617_all_hooks’ ); function wpse115617_all_hooks(){ //This is called for every filter & action //You can get the current hook to which it belongs with: $hook = current_filter(); } See http://queryposts.com/function/current_filter/

How can I send a message to the systemd journal from the command line?

systemd-cat is the equivalent to logger: echo ‘hello’ | systemd-cat In another terminal, running journalctl -f: Feb 07 13:38:33 localhost.localdomain cat[15162]: hello Priorities are specified just by part of the string: echo ‘hello’ | systemd-cat -p info echo ‘hello’ | systemd-cat -p warning echo ‘hello’ | systemd-cat -p emerg Warnings are bold, emergencies are bold … Read more