Logging SQL Queries

2017-02-22 Thread SSC_perl
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

Re: Perl script logging permissions

2012-05-26 Thread David Christensen
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

Perl script logging permissions

2012-05-26 Thread Kwaku Addo Ofori
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

Re: Perl... Logging to console and Log file

2011-01-13 Thread Robert Wohlfarth
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

Re: Perl... Logging to console and Log file

2011-01-13 Thread shawn wilson
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

Perl... Logging to console and Log file

2011-01-13 Thread vasanth
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:

Re: which module is suitable for logging into cisco devices

2008-11-25 Thread Ron Bergin
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

Re: which module is suitable for logging into cisco devices

2008-11-23 Thread Deviloper
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

Re: which module is suitable for logging into cisco devices

2008-11-23 Thread Chas. Owens
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

Re: which module is suitable for logging into cisco devices

2008-11-23 Thread monnappa appaiah
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]>

which module is suitable for logging into cisco devices

2008-11-23 Thread monnappa appaiah
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

Re: Logging STDERR and other output

2007-09-01 Thread Peter Scott
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

Re: Logging STDERR and other output

2007-09-01 Thread Peter Scott
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

Re: Logging STDERR and other output

2007-08-31 Thread Dr.Ruud
"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

Re: Logging STDERR and other output

2007-08-31 Thread Dr.Ruud
"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."

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
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

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
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

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
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. > > >

Re: Logging STDERR and other output

2007-08-30 Thread Adriano Ferreira
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

Re: Logging STDERR and other output

2007-08-30 Thread Adriano Ferreira
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

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
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

Re: Logging STDERR and other output

2007-08-30 Thread Peter Scott
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";

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
!\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";

Logging STDERR and other output

2007-08-30 Thread Beginner
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; ..

Re: Logging module in RHEL distro

2007-04-25 Thread Chas Owens
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

Logging module in RHEL distro

2007-04-25 Thread Nath, Alok (STSD)
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

Re: logging into web page with credintials

2007-02-08 Thread Owen
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

logging into web page with credintials

2007-02-08 Thread Sukhdev Bainiwal
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 => "",

Re: perl class design for logging updates on multiple tables

2006-04-26 Thread Mr. Shawn H. Corey
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

perl class design for logging updates on multiple tables

2006-04-26 Thread Graeme McLaren
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

logging on for FTP and failing

2006-04-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

Re: fork + objects + logging

2005-10-12 Thread Marcello
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

fork + objects + logging

2005-10-11 Thread Tom Allison
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

Looking for a thread safe logging module

2004-05-28 Thread Rajesh Dorairajan
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

Re: LWP Logging or the such..

2004-02-16 Thread R. Joseph Newton
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

Re: LWP Logging or the such..

2004-02-16 Thread Rob Dixon
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 > >

Re: LWP Logging or the such..

2004-02-16 Thread Martin R Morales
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

LWP Logging or the such..

2004-02-16 Thread Martin R Morales
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

Re: Logging to a Server via ftp.

2003-11-17 Thread John
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

Re: Logging to a Server via ftp.

2003-11-17 Thread Yupapa.com
# 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

Re: Logging to a Server via ftp.

2003-11-16 Thread R. Joseph Newton
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

Re: Logging to a Server via ftp.

2003-11-16 Thread Wiggins d'Anconia
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

Re: Logging to a Server via ftp.

2003-11-16 Thread John
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

Re: Logging to a Server via ftp.

2003-11-16 Thread Wiggins d'Anconia
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

Logging to a Server via ftp.

2003-11-16 Thread John
What is the module and some examples to do tha bove job? Thanks in advance.

Re: logging

2003-10-28 Thread Wiggins d Anconia
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

logging

2003-10-28 Thread PerlDiscuss - Perl Newsgroups and mailing lists
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

logging issue

2003-08-14 Thread Quenten Griffith
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 =

Re: logging issue

2003-08-09 Thread Quenten Griffith
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

Re: Logging to a file or FH?

2003-06-23 Thread deb
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

Re: Logging to a file or FH?

2003-06-23 Thread John W. Krahn
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

Logging to a file or FH?

2003-06-23 Thread deb
(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

Logging to a file or FH?

2003-06-23 Thread deb
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

RE: logging data to text file help!!

2002-09-12 Thread Winchester, Derek S (Derek)
-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

logging data to text file

2002-09-12 Thread Winchester, Derek S (Derek)
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:

RE: Logging details

2002-05-13 Thread John Edwards
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

Logging details

2002-05-13 Thread Shishir K. Singh
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

Re: Logging IP address to a file from the web.

2002-01-28 Thread Dave Runkle
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

Logging IP address to a file from the web.

2002-01-22 Thread Michael Pratt
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

Re: logging out a user

2001-10-30 Thread Pete Sergeant
... > > -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

RE: logging out a user

2001-10-30 Thread Bob Showalter
> -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

logging out a user

2001-10-29 Thread Matthew Blacklow
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,