tazpanel diff lib/libtazpanel @ rev 94

libtazpanel: improve log function for better activity overview
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 14 19:46:48 2011 +0200 (2011-04-14)
parents 783e2405d384
children 2392cabdcc3d
line diff
     1.1 --- a/lib/libtazpanel	Thu Apr 14 17:46:05 2011 +0200
     1.2 +++ b/lib/libtazpanel	Thu Apr 14 19:46:48 2011 +0200
     1.3 @@ -36,7 +36,7 @@
     1.4  			sed -e s"#^\#\([^']*\)#<span class='sh-comment'>\0</span>#"g \
     1.5  				-e s"#\"\([^']*\)\"#<span class='sh-val'>\0</span>#"g ;;
     1.6  		diff)
     1.7 -			sed  -e 's|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' \
     1.8 +			sed -e 's|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' \
     1.9  				-e s"#^-\([^']*\).#<span style='color: red;'>\0</span>#"g \
    1.10  				-e s"#^+\([^']*\).#<span style='color: green;'>\0</span>#"g \
    1.11  				-e s"#@@\([^']*\)@@#<span style='color: blue;'>@@\1@@</span>#"g ;;
    1.12 @@ -45,7 +45,8 @@
    1.13  
    1.14  # LOG activities
    1.15  log() {
    1.16 -	grep ^[a-zA-Z0-9] | sed s'/\.*\]//' >> $LOG_FILE
    1.17 +	grep ^[a-zA-Z0-9] | sed s'/\.*\]//' | \
    1.18 +	sed s"#[^']*#$date : \0#" >> $LOG_FILE
    1.19  }
    1.20  
    1.21  # Network interface status