Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: err_watch for when your errors are growing like hair or...

by chanio (Priest)
on Jan 22, 2006 at 16:55 UTC ( [id://524806]=note: print w/replies, xml ) Need Help??


in reply to err_watch for when your errors are growing like hair or...

It would be nice if you could parametrize data to: adapt to other log formats, and to other locales (just a different .ini file).

Use Term::ANSIColor for color coding. A color shift says more than 1K. words!

Perhaps, using this code, if you only need the days of the week locale...

perl -MPOSIX -Mlocale -e' ## GET LOCAL DATES AND NAMES my ($tnow,$gday)=(time,int(60*60*24)); ## TODAY IN SECONDS, SECONDS I +N ONE DAY (4 ADDING) my %wd; $wd{(localtime($tnow+($gday*$_)))[6]}=strftime("%a",localtime(($gday*$ +_)+$tnow)) foreach (0..6); ## RELATE +NUM. OF DAY OF THE WEEK WITH ITS NAME print("$wd{$_}, ") foreach (sort(keys(%wd))); ## DISPLAY NAMES IN ORDE +R (SEE LAST LINE) print $/ ## (WEEK DAYS IN SPANISH) __END__ dom, lun, mar, mié, jue, vie, sáb, '

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://524806]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-04-18 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found