X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fnglog.sh;h=852ee93c1e40498314d19f4d7a2986d31166a208;hb=HEAD;hp=c96f993a805a83c12a4ba6a41efb75dc0bb29d8b;hpb=1f69f1d0abe8fade4dd3e968220ea6309598c3b3;p=ngircd-alex.git diff --git a/contrib/nglog.sh b/contrib/nglog.sh index c96f993a..cb4eb3e9 100755 --- a/contrib/nglog.sh +++ b/contrib/nglog.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -10,11 +10,11 @@ # Please read the file COPYING, README and AUTHORS for more information. # # This script parses the log output of ngircd(8), and colorizes the messages -# accoring to their log level. Example usage: +# according to their log level. Example usage: # ./src/ngircd/ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh # -awk ' +gawk ' /^\[[[:digit:]]+:0 / {print "\033[1;95m" $0 "\033[0m"} /^\[[[:digit:]]+:1 / {print "\033[1;35m" $0 "\033[0m"} /^\[[[:digit:]]+:2 / {print "\033[1;91m" $0 "\033[0m"} @@ -23,4 +23,6 @@ awk ' /^\[[[:digit:]]+:5 / {print "\033[1m" $0 "\033[0m"} /^\[[[:digit:]]+:6 / {print $0} /^\[[[:digit:]]+:7 / {print "\033[90m" $0 "\033[0m"} -' +'