11-24-2005
how to write stderr in a subroutine log file?..
perl 5.6.1 in win2000:
my program uses a subroutine which will write log file. i will call that sub routine like this
&log_message("the file $inputfile opened");
what should i do to write the stderr on the same log file itself..
i tried to pass the stderr to the subroutine like
&log_message(\*STDERR);
and
&log_message(*STDERR) ;
but no use.,
dont know what to do...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
-----------
i thought to pass the stderr to the subroutine which writes in a log file..
when i use
&log_message(\*STDERR);
in the log file instead of the error messages, i am getting only this word
____________::GLOB(0x1ab507c)
... (1 Reply)
Discussion started by: sekar sundaram
1 Replies
2. Programming
I originally wrote my script using the korn shell and had to port it to bash on a another server. My script is working find for backing up but noticed that now after the move, I am not getting any output to my log files.
Using Korn shell, this worked for me for some odd reason. This was sending... (2 Replies)
Discussion started by: metallica1973
2 Replies
3. Shell Programming and Scripting
Hello All,
I have 2 perl sub-routines.
my $myDir = myDir_path;
my $file;
sub convert(){
system ("./$myConvertScript >> $myDir/$file_CONV" );
$file2 = $myDir/$file_CONV;
}
sub addDB(){
open(CONF, $config)
or die "Cannot Open $config for reading. ";
while(<CONF>){... (1 Reply)
Discussion started by: ad23
1 Replies
4. Shell Programming and Scripting
I got a huge log in zipped files, i need to write out lines by specific data and if the line with the same contains XML message with the same sessionID will be written to the file to.
The log structure:
2013-08-16 16:31:06,810 ( 122: rogate) INFO - UId:10453, GId:5422: new... (16 Replies)
Discussion started by: batka
16 Replies
5. Shell Programming and Scripting
Hi all,
I have
export LOG_FILE=$HOME_DIR/error.log
sqlplus -s /nolog << EOF
whenever sqlerror exit sql.sqlcode
@$HOME_DIR/connect.sql
whenever sqlerror exit sql.sqlcode
@$SQL_FILE
EOF
can display the sql error in putty, how can I write them into log file ?:( (2 Replies)
Discussion started by: Hscript
2 Replies
6. Shell Programming and Scripting
Hello,
As stated in the title, I do some hacked parallel processing by running multiple instances of bash scripts, each in their own subshell. The code looks like this,
# launch one batch-train script in background for each value in fold group list
for FOLD_GROUP in "${FOLD_GROUP_LIST}"
do
... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
7. Solaris
Hi,
I got a process (c written) that we usually run this way :
EmsChkQu >> /EMS/log/EmsChkQu.log 2>&1
When trying to use it as a service I defined it this way :
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle... (6 Replies)
Discussion started by: zionassedo
6 Replies
8. Shell Programming and Scripting
Hi
I am transferring files to SFTP Server using sftp command(below), and want to write log file of this activity. Can you please advise if i am doing wrong.
sftp -v -oIdentityFile=/home/bbm_user/bbm/private_open_ssh.ppm umf-sftp@bbm-prod-send.com <<EOF
put $local_path/*.gz $remote_path/... (3 Replies)
Discussion started by: cnrj
3 Replies
9. Shell Programming and Scripting
Hello Team-
we would like to implement an approach which has to write the log file simultaneously
when .sql file is executing by Unix process. At present,it is writing the log file
once the process is completed. I've tested the current process with the below
approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies
10. Programming
(Apologies for any typos.)
OSX 10.12.3 AND Windows 10.
This is for the serious Python experts on at least 3.5.x and above...
In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly.
Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
LEARN ABOUT DEBIAN
rolllog
ROLLLOG(1p) User Contributed Perl Documentation ROLLLOG(1p)
NAME
rolllog - DNSSEC-Tools utility to write messages to the DNSSEC rollover log file
SYNOPSIS
rolllog -loglevel <level> <log_message>
DESCRIPTION
The rolllog program writes log messages to the DNSSEC rollover log file. rolllog does not actually write the messages itself; rather, it
sends them to the rollerd rollover daemon to write the messages. rollerd keeps track of a logging level, and only messages of that level
or higher are written to the log file.
OPTIONS
The following options are recognized:
-loglevel level
Logging level of this message. The valid levels are defined in rollmgr.pm(3). This option is required.
-help
Display a usage message.
-Version
Displays the version information for rolllog and the DNSSEC-Tools package.
COPYRIGHT
Copyright 2006-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
AUTHOR
Wayne Morrison, tewok@tislabs.com
SEE ALSO
rollctl(8), rollerd(8)
Net::DNS::SEC::Tools::rollmgr.pm(3)
perl v5.14.2 2012-06-21 ROLLLOG(1p)