I’m using DBI::Log to capture SQL queries but the log file gets huge
exponentially. Is there a way to filter what gets logged? If I could
eliminate the SELECT queries, that would help a lot.
I’ve also install Log4perl and DBIx::Log4perl. This appears to be a
very powerful sol
On 05/26/2012 12:33 PM, Kwaku Addo Ofori wrote:
I need some help. I've just finished my script and a manual test is fine.
Basically, it's a script that gets the PID of some selected process and
lists all the open file descriptors for the processes pipes this to a file.
Problem is, when I run the
Hi Guys,
I need some help. I've just finished my script and a manual test is fine.
Basically, it's a script that gets the PID of some selected process and
lists all the open file descriptors for the processes pipes this to a file.
Problem is, when I run the script manually it works well and writes
Thu, Jan 13, 2011 at 2:15 AM, vasanth wrote:
> Kindly help me regarding the issue Im facing with the below perl
> script,
>
> I have a below script which send the message to Console.
>
> I need to modify this script it send message to a Log file.
>
> Please find the below steps which i performed
On Jan 13, 2011 4:19 AM, "vasanth" wrote:
>
> Hi friends,
>
> Kindly help me regarding the issue Im facing with the below perl
> script,
>
> I have a below script which send the message to Console.
>
> I need to modify this script it send message to a Log file.
>
> Please find the below steps whic
Hi friends,
Kindly help me regarding the issue Im facing with the below perl
script,
I have a below script which send the message to Console.
I need to modify this script it send message to a Log file.
Please find the below steps which i performed to send a message to
log.
Orginal Script:
On Nov 23, 1:17 pm, [EMAIL PROTECTED] (Monnappa Appaiah) wrote:
> i forgot to mention that, i'l be running the script from the windows machine
> ..so pls let me know the module which can login to cisco devices
> using ssh, execute certain commands and give me the output.
>
> Thanks,
> Monna
There are some moduls I use under linux.
Problem is that Cisco CLI may change prompt.
Checkout Net::SSH and Perl Expect. (Also there is a Modul called
Net::SSH::Expect,
which I had not tried yet.)
You may need to install Cygwin. This gives you a lot of linux utils.
HaveFun,
B.
monnappa appai
On Sun, Nov 23, 2008 at 16:17, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> i forgot to mention that, i'l be running the script from the windows machine
> ..so pls let me know the module which can login to cisco devices
> using ssh, execute certain commands and give me the output.
>
> Than
i forgot to mention that, i'l be running the script from the windows machine
..so pls let me know the module which can login to cisco devices
using ssh, execute certain commands and give me the output.
Thanks,
Monnappa
On Sun, Nov 23, 2008 at 11:51 PM, monnappa appaiah <[EMAIL PROTECTED]>
Hi all,
I'm looking for a module which can login to cisco devices using
ssh, execute certain commands and give me the output.can
somebody suggest me
the module which is best suitable for loggin into cisco devices via ssh.
Thanks,
Monnappa
On Thu, 30 Aug 2007 10:57:20 -0300, Adriano Ferreira wrote:
> On 8/30/07, Peter Scott <[EMAIL PROTECTED]> wrote:
>> Why are you using a BEGIN block? Why not just make it the first
>> executable statement? Do you have any other 'use' statements in the
>> program?
>
> Because otherwise it would be
On Thu, 30 Aug 2007 17:25:28 +0100, Beginner wrote:
> On 30 Aug 2007 at 10:07, Mumia W. wrote:
>
>> On 08/30/2007 09:37 AM, Beginner wrote:
>> > q2) Will our $logfile now be a shared variable across all my modules?
>> Try it and see.
>
> No. It's not.
Yes. It is. It was declared (three posts
"Beginner" schreef:
> Log::Handler looks pretty comprehensive.
Consider also Log::Log4Perl.
http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
"Beginner" schreef:
> Adriano Ferreira:
>> use lib qw(/etc/perl);
>
> use lib ('/etc/perl');
The idiom adivised by Adriano is more flexible.
See `perldoc lib`.
Example:
use lib qw(
/usr/local/cvs_tree/lib
/etc/perl
);
--
Affijn, Ruud
"Gewoon is een tijger."
ut,
> > or if I do the same to $debug as I did with $logfile, use our instead
> > of my. Will that allow those subroutines to check if debug is
> > enabled?
> Most people create a logging module if they want total control over
> logging. That module might have a packag $de
Dp.
Most people create a logging module if they want total control over
logging. That module might have a packag $debug_level variable that
determines how much information is logged.
However, the Perl error and warning messages don't fit your logging
model, so you'll probably have
On 30 Aug 2007 at 10:59, Adriano Ferreira wrote:
> On 8/30/07, Beginner wrote:
> >
> > BEGIN { unshift @INC, '/etc/perl';
>
> This is better done with
>
> use lib qw(/etc/perl);
use lib ('/etc/perl');
Well that seems to work :-).
> which doesn't need the surrounding "BEGIN" block.
>
> >
block to direct STDERR into the file:
> > >
> > > BEGIN {
> > > open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't
> > > write to file: $!\n";
> > > }
> > >
> > > use strict;
> > > use
open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't
> > write to file: $!\n";
> > }
> >
> > use strict;
> > use warnings;
> > ...
> > ### Start some logging ###
> > my $log;
> > my $logfile = &qu
n(STDERR, ">>/usr/local/myreports/report.log") || die "Can't
> > write to file: $!\n";
> > }
> >
> > use strict;
> > use warnings;
> > ...
> > ### Start some logging ###
> > my $log;
> > my $logfile = "$di
e "Can't
> write to file: $!\n";
> }
>
> use strict;
> use warnings;
> ...
> ### Start some logging ###
> my $log;
> my $logfile = "$dist_dir/report.log";
> open($log,">>$logfile") || die "Can't write to $logfile: $!\n";
!\n";
}
use strict;
use warnings;
...
### Start some logging ###
my $log;
my $logfile = "$dist_dir/report.log";
open($log,">>$logfile") || die "Can't write to $logfile: $!\n";
print $log "$0 called at ", &tm," with pid $$\n";
Hi,
I want all the output plus any error messages to got to a log file. I
used the BEGIN block to direct STDERR into the file:
BEGIN {
open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't
write to file: $!\n";
}
use strict;
use warnings;
..
On 4/26/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote:
Hi,
I am using perl which comes with RHEL distribution.
I think the perl version is 5.8.5.
I am not seeing any modules specific for message logging.
Does it have any ?
I am prohibite
Hi,
I am using perl which comes with RHEL distribution.
I think the perl version is 5.8.5.
I am not seeing any modules specific for message logging.
Does it have any ?
I am prohibited from installing any modules on top of my RHEL.
Thanks
Alok
On Thu, 8 Feb 2007 11:15:46 -0800
"Sukhdev Bainiwal" <[EMAIL PROTECTED]> wrote:
> I get compilation errors at line where I pass in my credentials; is my
> syntax ok.
>
> my $url = "http://abcs:8080/abcs/jsp/login.jsf";
>
>
>
> my $request = new HTTP::Request( 'POST' => $url, $userName => "yy
I get compilation errors at line where I pass in my credentials; is my
syntax ok.
#!/usr/bin/perl
use LWP::UserAgent;
my $browser = new LWP::UserAgent;
my $url = "http://abcs:8080/abcs/jsp/login.jsf";
my $request = new HTTP::Request( 'POST' => $url, $userName => "",
On Wed, 2006-26-04 at 19:44 +0100, Graeme McLaren wrote:
> Hi all, I have a problem where I have say, five tables one of which is
> called "log" this keeps a log of various updates that are done to the other
> four tables.
By tables, do you means SQL tables in a SQL database? Many modern SQL
dat
Hi all, I have a problem where I have say, five tables one of which is
called "log" this keeps a log of various updates that are done to the other
four tables.
I have been working on one particular script and I have a function called
"add_to_log" which adds various information about the update
I have a process which runs and when it finds a trigger file, then logs
on via ftp. The logon is tied to the month and changes accordingly. When there
is a month switchover of late this process is failing.
The call for the logon:
# call to logon process for ftp
r
Tom Allison ha scritto:
[snip other question]
Logging:
I am using a package Log::Dispatch to do my logging.
Is there any penalty to loading the same modules for Log::Dispatch into
multiple Packages (Main plus all my custom package/modules)? IIRC this
should share the memory but allow each
g when compiled under gcc. Somewhere there's a
bug but it took a better man than me to find the report on the internet.
Logging:
I am using a package Log::Dispatch to do my logging.
Is there any penalty to loading the same modules for Log::Dispatch into
multiple Packages (Main plus
Hello All,
I am looking for a thread-safe Perl logging module to log output from a
Multi-threaded Perl Application. When I tried to write to a log file using
simple redirection, the threads contest for the log file. Creating a log
file for each thread creates a bunch of log files in my machine
Martin R Morales wrote:
> Good Morning/Afternoon Everyone,
>
> I have been reading up on LWP::UserAgent and HTTP::Request of the LWP package.
> This is good stuff.
> But I am still confused about a couple of things. Here is ther senario. I have
> a file I want to download from
> my server and
hem to a file for later examination insted of dumping to stdout.
> >
> > Thus far I have a script that will do what I want it to do, but now I
> > need to understand how to save my file(s)
> > to disk insted of dumping to stdout, and logging the responses to a
> >
ile(s)
to disk insted of dumping to stdout, and logging the responses to a
file for review. Let me know if I have made myself unclear. I look
forward to hearing from
you all soon with your input and ideas.
Thank You,
~Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comman
tand how to save my file(s)
to disk insted of dumping to stdout, and logging the responses to a file
for review. Let me know if I have made myself unclear. I look forward to
hearing from
you all soon with your input and ideas.
Thank You,
~Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Thanks a lot Yupapa.com!
- Original Message -
From: "Yupapa.com" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 16, 2003 11:18 PM
Subject: Re: Logging to a Ser
# Yupapa Web Hosting =^.^=
# Web Site - http://www.yupapa.com
# Support - http://forums.yupapa.com
# Email - [EMAIL PROTECTED]
###
"John" <[EMAIL PROTECTED]> ???:[EMAIL PROTECTED]
> Yes, logging into.
>
> Have you got
John wrote:
> Yes, logging into.
>
> Have you got a relevant script?
You should probably check in with news://nntp.perl.org/perl.jobs
and let people there know that you have a job available. This
is a list for people who are interested inlearning to use Perl.
Joseph
--
To unsub
John wrote:
Yes, logging into.
Have you got a relevant script?
What part of the documentation don't you understand? Where have you hit
snags? Have you looked at the section "Use Examples"? Gonna have to put
some effort into this...
http://danconia.org
- Original Mess
Yes, logging into.
Have you got a relevant script?
- Original Message -
From: "Wiggins d'Anconia" <[EMAIL PROTECTED]>
To: "John" <[EMAIL PROTECTED]>
Cc: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Sunday, November 16, 2003 5:28 PM
Sub
John wrote:
What is the module and some examples to do tha bove job?
Thanks in advance.
I am assuming you mean "Logging into a server via ftp"...
Net::FTP
Or did you really mean "Logging to a server via ftp"...
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTE
What is the module and some examples to do tha bove job?
Thanks in advance.
ix domain who would
have thunk it.
This will probably somewhat depend on how the Perl script is written,
presumably if you are writing to adm/messages and since it is over the
network then the script is logging via syslog? In which case the syslog
configuration should be able to provide the mechan
My co-worker wrote a perl script on a WIN 2000 Advance server that
monitors my E10K 8 Unix domains. It executes every 15 minutes and then the
output attempts are logged in the /var/adm/messages on my unix domains
each time. How do I redirect this output to another log of its own to keep
it from fil
Hello all,
For somereason I have a bit of code that will not
write out to the log file when it finds my array empty
#Start of upload Files
} elsif ( $ARGV[1] eq "-p" ) {
$log->write(" Ok we have been passed the
-p so we will be putting files to $site");
my $ftp =
Disregard I had an extra space after the glob $file
part once I made it (glob $file) instead of (glob
$file ) it worked. Odd very odd.
--- Quenten Griffith <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> For somereason I have a bit of code that will not
> write out to the log file when it finds my ar
Cool. I didn't know about the IPC::Open3 module. Will look at it.
Thanks for the pointer!
deb
At 15:04:25, on 06.23.03:
Cracks in my tinfoil beanie allowed John W. Krahn to seep these bits into my brain:,
> Deb wrote:
> >
> > I've got a script which opens a filehandle to write print statments
Deb wrote:
>
> I've got a script which opens a filehandle to write print statments to a file.
> But, I'm also running some system commands, and I would also like to send
> stdout and stderr to that filehandle. I could just echo text to a file, or I
> could use a filehandle. Which would be "bette
(Apologies if this gets out to you more than once...)
I've got a script which opens a filehandle to write print statments to a file.
But, I'm also running some system commands, and I would also like to send
stdout and stderr to that filehandle. I could just echo text to a file, or I
could use a f
I've got a script which opens a filehandle to write print statments to a file.
But, I'm also running some system commands, and I would also like to send
stdout and stderr to that filehandle. I could just echo text to a file, or I
could use a filehandle. Which would be "better?"
my $log
-Original Message-
From: Winchester, Derek S (Derek) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: logging data to text file
I have composed this perl script and I would like the results from each
command to append a log file. Is
I have composed this perl script and I would like the results from each
command to append a log file. Is there a way I can do this? I have seen
several examples but none of them looks as if it would achieve what I am
trying to do here. Any help would be appreciated.
#!/usr/bin/perl -w
# file:
die "Can't append to error.txt: $!";
print ERROR $error;
close ERROR;
die "\n";
}
John
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: 13 May 2002 17:04
To: [EMAIL PROTECTED]
Subject: Logging details
Is there a better way of l
Is there a better way of logging the details in a file.
E.g.
I would like the error message to go into a file instead of going to the stderr
if (system ($cmd)) {
die "Error $!\n";
}
I don't want to code the above as
open (LOG,"> $logFile");
if (system
On Mon, 21 Jan 2002, Michael Pratt wrote:
> I cant seem to get this to work is there something Im missing?
>
> $logfile = '/logs/ipaccess.log';
> $date = scalar localtime;
>
> open(IPLOG, ">>$logfile"
Check your quotes - do you know the difference between single- and
double-quotes?
Are you usi
I cant seem to get this to work is there something Im missing?
$logfile = '/logs/ipaccess.log';
$date = scalar localtime;
open(IPLOG, ">>$logfile") || die "Cannot open $logfile";
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG "$date ";
print IPLOG "$ip \n";
close IPLOG;
Mike
--
To unsubscribe, e-m
...
> > -Original Message-
> > From: Matthew Blacklow [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 29, 2001 7:33 PM
> > To: [EMAIL PROTECTED]
> > Subject: logging out a user
> >
> >
> > Hi Guys,
> >
> > Got a bit of a conundrum here. I
> -Original Message-
> From: Matthew Blacklow [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 29, 2001 7:33 PM
> To: [EMAIL PROTECTED]
> Subject: logging out a user
>
>
> Hi Guys,
>
> Got a bit of a conundrum here. I have a perl script that does var
Hi Guys,
Got a bit of a conundrum here. I have a perl script that does various
things for any user who runs it. What I need it to do is, at the end of the
script, not only exit the script, but actually log that user out of their
shell login on the box completely.
Sounds like a weird thing to do,
62 matches
Mail list logo