Sponsored Content
Operating Systems HP-UX How to Redirect the error messages from Syslog file to our own Application Log File Post 302071506 by balasubramaniam on Friday 21st of April 2006 07:38:34 AM
Old 04-21-2006
CPU & Memory How to Redirect the error messages from Syslog file to our own Application Log File

Hello,
I am New to Unix.

I am Using HP-UX 9000 Series for my Application.

I am Currently Facing an Issue that the error messages are being written in the syslog file instead of the Application Log File. The Codes for that Syslog.h is written in Pro*C.

I want to know how to Redirect these Error Messages from the syslog Files to the Application Log Files.

Is there any Code Changes Required,If so Please send me a Sample Code so that it will be of some use for me.

Help of any kind will of Greatful to me.


With Regards,
Bala.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

redirect standard error into log file

Hi, I am new in shell scripting. Can anyone point out what wrong of below script. If I want the error output to "sqlerror.log" and database pool data output to "bulk_main.dat". Right now, the below script, if successful execute, the data will output to bulk_main.dat && sqlerror.log both... (7 Replies)
Discussion started by: epall
7 Replies

2. Shell Programming and Scripting

redirect output to log file

hello all, I'm invoking the program generate-report using backticks from my perl program and redirecting the output to the log file sge-stderr.log. But when i check the process using ps command it is spawing two processes where the below code is parent process and the program generate-report as... (2 Replies)
Discussion started by: kalyanraj
2 Replies

3. Shell Programming and Scripting

Real time log file redirect

Hi all, i would like to write the shell script program, it can monitor the access_log "real time" when the access_log writing the line contain "abcdef" the program will be "COPY" this line into a file named "abcdef.txt", do the same thing if the contain "123456" "COPY" it into a file named... (3 Replies)
Discussion started by: eric_wong_ch
3 Replies

4. Shell Programming and Scripting

redirect errors to log file

I am working on a generic script that will run a shell script with the arguments passed and redirect errors to one file, and all other output to another file. Then if there is anything in the error file it emails the error to me, otherwise it exits. The advantage for this approach is that I... (0 Replies)
Discussion started by: gandolf989
0 Replies

5. HP-UX

how to redirect the growing contents of log file to another file in unix

how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies

6. Shell Programming and Scripting

Appending error messages from log file next to the corresponding error record

Hi Everyone, I have an issue and trying to get a solution but was not succesful yet. Any help is greatly appreciated. I am using ksh to inoke sql loader to load data from txt file into two oracle tables based on the condition written in the control file. If an error occurs while loading into... (8 Replies)
Discussion started by: vpv0002
8 Replies

7. Shell Programming and Scripting

need help in search the error messages from log file

Hi, My log file has error messages, universal no and universal ID. The problem is i have to search Universal ID from the error messages. But the log file write error messages with universal no and error messages in one line. and universal no with universal ID in other line. So i write two loops... (5 Replies)
Discussion started by: pjlotiya
5 Replies

8. UNIX for Dummies Questions & Answers

[Solved] How to Redirect Output To Log File?

I have the below script, but when i execute it is still printing to screen is there a way i can stop this and just print everything to the log file. Thank you. #!/bin/bash exec > >(tee "/var/log/ScriptLogs/called_from_incrontab.log") 2>&1 DIR="$1" FILE="$2" echo "STEP 1: Datafile... (5 Replies)
Discussion started by: Ariean
5 Replies

9. UNIX for Dummies Questions & Answers

Syslog Messages from Remote Server are not writing to Log File Anymore

Hello All, Server: SUSE Linux Enterprise Server 11.3 (x86_64) Syslog-ng Version: syslog-ng 2.0.9 We have configured a Cisco router to send it's log messages to this server listed above. This has been working just perfectly for the last couple months, but we had never setup the log... (9 Replies)
Discussion started by: mrm5102
9 Replies

10. Ubuntu

How redirect syslog message to a specified file?

Hello to everyone! I have a question about syslog. I want put the messages of log in a particular file but really i don't know how to do that or i don't get the results that I want. I do this: #include <stdio.h> #include <stdlib.h> #include <syslog.h> int main (void) { ... (4 Replies)
Discussion started by: Kovalevski
4 Replies
CGI::Application::Plugin::DevPopup::Log(3pm)		User Contributed Perl Documentation	      CGI::Application::Plugin::DevPopup::Log(3pm)

NAME
CGI::Application::Plugin::DevPopup::Log - show all data written to an IO::Scalar handle. VERSION
version 1.07 SYNOPSIS
use CGI::Application::Plugin::DevPopup; use CGI::Application::Plugin::DevPopup::Log; sub cgiapp_init { # example using LogDispatch my $log_fh = $this->devpopup_log_handle; $this->log_config( APPEND_NEWLINE => 1, LOG_DISPATCH_MODULES => [ { module => 'Log::Dispatch::Handle', name => 'popup', min_level => $ENV{CAP_DEVPOPUP_LOGDISPATCH_LEVEL} || 'debug', handle => $log_fh, }, ] ); $this->log->debug("log something"); } The rest of your application follows ... DESCRIPTION
CGI::Application::Plugin::DevPopup::Log will create a "Log" section in the DevPopup output. All data written to the filehandle returned by "$this->devpopup_log_handle" will be output. CGI::Application::Plugin::LogDispatch is very handy for this, but you can write to that filehandle anyway you'd like. METHODS
devpopup_log_handle Generates a (fake) filehandle you can pass on to a logging plugin. See the Synopsis for usage. SEE ALSO
L<CGI::Application::Plugin::DevPopup> L<CGI::Application> L<CGI::Application::Plugin::LogDispatch> AUTHOR
Joshua I Miller, unrtst@cpan.org BUGS
Please report any bugs or feature requests to bug-cgi-application-plugin-devpopup@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-DevPopup <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI- Application-Plugin-DevPopup>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. COPYRIGHT &; LICENSE Copyright 2007 Joshua Miller, 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.12.4 2011-10-31 CGI::Application::Plugin::DevPopup::Log(3pm)
All times are GMT -4. The time now is 12:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy