Hi
Can you suggest some perl script. My OS is HP-UX 11.11 I want to it into a cron job.
Every night it will backup the file with that day's date and open a dummy file.
Thanks
Ash (3 Replies)
Hi,
I'm using Linux 2.6 cross compiled for a embedded powerpc.
Earlier we were using busybox syslogd for logging the messages, but as the flexibilty is less, we decided to move to standard syslog.
Now I want to limit the size of the log file (/var/log/messages) to 128K.
I couldn't find... (4 Replies)
Hi,
I am using fetchmail in my application so as to download mails to the localhost where the application is hosted from the mailserver.Fetchmail is configured as as to run as a daemon polling mails during an interval of 1sec.
So my concern here is, during each 2sec it is writing two... (10 Replies)
Hi Can anyone assist me, I am trying to compate the size of a logfile to a maximum size 1000 and delete if exceeds the limit.
The problem I am getting is the command not found for the line
if ( $LOGNAME_SIZE >= $MAXSIZE); then
Appreciate your response.
Script:
LOGDIR="/home/... (6 Replies)
I am very new tothe shellscripting. I wrote a script as follows.
NOW=$(date +"%b-%d-%y")
LOGFILE="log-$NOW.log"
sqlplus -s username/password @select.sql <<EOF >>$LOGFILE
exit
EOF
the out put of the script file is around 20 columns.But it is not displaying in single line. Some part ofthe... (2 Replies)
:wall:Dear All.:p
How to check log size every 10min. by script (not crontab)
if log size not change with alert "Log not update"
My Path :: /usr/home/logical/mono/log/tplink/
My Log :: mono11_tplink.log , mono12_tplink.log , etc
I want oup put.
EX. if log not update.
.
.
.
Fri Jan ... (1 Reply)
Anyone knows how to use AWK to achieve the following
Sun Feb 12 00:41:01-00:41:59 Success:2 Fail:2
Sun Feb 12 00:42:01-00:42:59 Success:1 Fail:2
Sun Feb 12 01:20:01-01:20:59 Success:1 Fail:2
Mon Feb 13 22:41:01-22:41:59 Success:1 Fail:1
log file:
Success
Success
Fail
Fail
... (9 Replies)
Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
this is my log:
xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Discussion started by: jockx
8 Replies
LEARN ABOUT DEBIAN
log::handler::levels
Log::Handler::Levels(3pm) User Contributed Perl Documentation Log::Handler::Levels(3pm)NAME
Log::Handler::Levels - All levels for Log::Handler.
DESCRIPTION
Base class for Log::Handler.
Just for internal usage and documentation.
METHODS
Default log level
debug()
info()
notice()
warning(), warn()
error(), err()
critical(), crit()
alert()
emergency(), emerg()
Checking for active levels
is_debug()
is_info()
is_notice()
is_warning(), is_warn()
is_error(), is_err()
is_critical(), is_crit()
is_alert()
is_emergency(), is_emerg()
Special level
fatal()
Alternative for the levels "critical" - "emergency".
is_fatal()
Check if one of the levels "critical" - "emergency" is active.
Special methods
trace()
This method is very useful if you want to add a full backtrace to your message. Maybe you want to intercept unexpected errors and want
to know who called "die()".
$SIG{__DIE__} = sub { $log->trace(emergency => @_) };
By default the backtrace is logged as level "debug".
# would log with the level debug
$log->trace('who called who');
If you want to log with another level then you can pass the level as first argument:
$log->trace(info => $message);
dump()
If you want to dump something then you can use "dump()". The default level is "debug".
my %hash = (foo => 1, bar => 2);
$log->dump(\%hash);
If you want to log with another level then you can pass the level as first argument:
$log->dump($level => \%hash);
die()
This method logs the message to the output and then call "Carp::croak()" with the level "emergency" by default.
$log->die('an emergency error here');
If you want to log with another level, then you can pass the level as first argument:
$log->die(fatal => 'an emergency error here');
log()
With this method it's possible to log messages with the log level as first argument:
$log->log(info => 'an info message');
Is the same like
$log->info('an info message');
and
$log->log('an info message');
If you log without a level then the default level is "info".
PREREQUISITES
Carp
Data::Dumper
EXPORTS
No exports.
REPORT BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
If you send me a mail then add Log::Handler into the subject.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-11-21 Log::Handler::Levels(3pm)