07-03-2012
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I would like to write a bash script that would monitor a log file for a certain number of logs, let's say 500 logs and when it reaches that number to write the last log to another file. For example, I want to watch the /var/adm/messages and everytime, there is 500 new logs that are... (1 Reply)
Discussion started by: Pouchie1
1 Replies
2. Shell Programming and Scripting
HI All,
I have a log file where the logs will be in the format as given below:
2011-05-25 02:32:51 INFO PROCESS STARTING
2011-05-25 02:32:52 INFO PROCESS STARTED
.
.
.
I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies
3. Shell Programming and Scripting
Hi ,
I have a Data cleansing process which creates different log file for each step , when the process runs it creates following log files in below order:
p1_tranfrmr_log.txt
p1_tranfrmr_stats.txt
p2_globrtr_log.txt
p2_globrtr_stats.txt
p3_cusparse_log.txt
p3_cusparse_stats.txt
'
'... (8 Replies)
Discussion started by: sonu_pal
8 Replies
4. Shell Programming and Scripting
I am executing a stored procedure through shell script. In the procedure, i have dbms_output.put_line to log the comments. This is working fine and but logs are available only after the execution of the pl/sql procedure's completion.
I want to print the log comments while executing the procedure... (2 Replies)
Discussion started by: vel4ever
2 Replies
5. Shell Programming and Scripting
Hello,
I need a utility script or command that will extract the following lines from a file based on a 'word' contain in a line. For example my file contains lot of lines.
So if i pass 1800182 to the script/command it should return everything between 1st RequestNetRates tag before it and 1st... (4 Replies)
Discussion started by: jakSun8
4 Replies
6. Shell Programming and Scripting
story
------------------------
The file is a.out, it consist a set of logs from user access to my system ( email system)
question
--------------------------
using shell script, how can we extract 2 sets of IP output from the a.out log by separate the IP, determine human and non-human... (21 Replies)
Discussion started by: Mr_47
21 Replies
7. Shell Programming and Scripting
HI,
I want to search for a logs which are trace between specific date and time from logs file.
My logs are generated like this :-
Tue Jun 18 05:00:02 EEST 2013 | file_check.sh| Message:script has files to process.
Thu Jun 20 05:00:02 EEST 2013 | file_check.sh| Message:script has files to... (5 Replies)
Discussion started by: ketanraut
5 Replies
8. Shell Programming and Scripting
I have a log file with the below contents :
log_file_updated.txt :
Jul 5 03:33:06 rsyslogd: was
Jul 5 03:33:09 adcsdb1 rhsmd: This system is registered.
Sep 2 02:45:48 adcsdb1 UDSAgent: 2015-07-05 04:24:48.959 INFO Worker_Thread_4032813936 Accepted connection from host <unknown>... (3 Replies)
Discussion started by: rahul2662
3 Replies
9. Shell Programming and Scripting
I want to extract the logs between the current time stamp and 15 minutes before and sent an email to the people configured. I developed the below script but it's not working properly; can someone help me?? I have a log file containing this pattern:
Constructor QuartzJob
... (3 Replies)
Discussion started by: puneetkhullar
3 Replies
10. Shell Programming and Scripting
I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog.
tail -f /var/log/messages
dblogger: msg_to_dbrow: no logtype using missing
dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
LEARN ABOUT DEBIAN
log::any::adapter
Log::Any::Adapter(3pm) User Contributed Perl Documentation Log::Any::Adapter(3pm)
NAME
Log::Any::Adapter -- Tell Log::Any where to send its logs
VERSION
version 0.07
SYNOPSIS
use Log::Any::Adapter;
# Use Log::Log4perl for all categories
#
Log::Log4perl::init('/etc/log4perl.conf');
Log::Any::Adapter->set('Log4perl');
# Use Log::Dispatch for Foo::Baz
#
use Log::Dispatch;
my $log = Log::Dispatch->new(outputs => [[ ... ]]);
Log::Any::Adapter->set( { category => 'Foo::Baz' },
'Dispatch', dispatcher => $log );
# Use Log::Dispatch::Config for Foo::Baz and its subcategories
#
use Log::Dispatch::Config;
Log::Dispatch::Config->configure('/path/to/log.conf');
Log::Any::Adapter->set(
{ category => qr/^Foo::Baz/ },
'Dispatch', dispatcher => Log::Dispatch::Config->instance() );
# Use your own adapter for all categories
#
Log::Any::Adapter->set('+My::Log::Any::Adapter', ...);
DESCRIPTION
The "Log-Any-Adapter" distribution implements Log::Any class methods to specify where logs should be sent. It is a separate distribution so
as to keep "Log::Any" itself as simple and unchanging as possible.
You do not have to use anything in this distribution explicitly. It will be auto-loaded when you call one of the methods below.
ADAPTERS
In order to use a logging mechanism with "Log::Any", there needs to be an adapter class for it. Typically this is named
Log::Any::Adapter::something.
The following adapters are available on CPAN as of this writing:
o Log::Any::Adapter::Log4perl - work with log4perl
o Log::Any::Adapter::Dispatch - work with Log::Dispatch or Log::Dispatch::Config
You may also find other adapters on CPAN by searching for "Log::Any::Adapter", or create your own adapter. See
Log::Any::Adapter::Development for more information on the latter.
SETTING AND REMOVING ADAPTERS
Log::Any::Adapter->set ([options, ]adapter_name, adapter_params...)
This method sets the adapter to use for all log categories, or for a particular set of categories.
adapter_name is the name of an adapter. It is automatically prepended with "Log::Any::Adapter::". If instead you want to pass the full
name of an adapter, prefix it with a "+". e.g.
# Use My::Adapter class
Log::Any::Adapter->set('+My::Adapter', arg => $value);
adapter_params are passed along to the adapter constructor. See the documentation for the individual adapter classes for more
information.
An optional hash of options may be passed as the first argument. Options are:
category
A string containing a category name, or a regex (created with qr//) matching multiple categories. If not specified, all categories
will be affected.
lexically
A reference to a lexical variable. When the variable goes out of scope, the adapter setting will be removed. e.g.
{
Log::Any::Adapter->set({lexically => my $lex}, ...);
# in effect here
...
}
# no longer in effect here
"set" returns an entry object, which can be passed to "remove".
Log::Any::Adapter->remove (entry)
Remove an entry previously returned by "set".
MULTIPLE ADAPTER SETTINGS
"Log::Any" maintains a stack of entries created via "set".
When you get a logger for a particular category, "Log::Any" will work its way down the stack and use the first matching entry.
Whenever the stack changes, any "Log::Any" loggers that have previously been created will automatically adjust to the new stack. For
example:
my $log = Log::Any->get_logger();
$log->error("aiggh!"); # this goes nowhere
...
{
Log::Any::Adapter->set({ local => my $lex }, 'Log4perl');
$log->error("aiggh!"); # this goes to log4perl
...
}
$log->error("aiggh!"); # this goes nowhere again
SEE ALSO
Log::Any
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-02-22 Log::Any::Adapter(3pm)