To view the log of a function


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting To view the log of a function
# 1  
Old 01-10-2013
To view the log of a function

I have a function like this
Code:
 
validate()
{
/* Inside this I will do some activites
}

How I can redirect this function to a log file , so that If I look into that log file I can understand ,is there any error happened inside the function or not

Last edited by Scott; 01-10-2013 at 07:09 AM.. Reason: Code tags
# 2  
Old 01-10-2013
Well, what be the system (shell, language, ...)?
# 3  
Old 01-10-2013
I am using shell scripting
# 4  
Old 01-10-2013
Well, there's many a shell in them there hills. If it were bash, you could set -vx; cf man bash:
Quote:
-v Print shell input lines as they are read.
-x After expanding each simple command, for command, case command, select command, or arithmetic for command, display the expanded value of PS4, followed by the command and its expanded arguments or associated word list.
Use redirection into a log file to be read/evaluated later.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cd to another directory to view a log file

Hi guys Today I have been working on a script to execute to view entries within a log file. I have successfully got the command I want to execute within the script itself. I want to view the last 5 entries within a log file and see just the last numbers. The file name would change depending... (5 Replies)
Discussion started by: simpsa27
5 Replies

2. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies

3. Shell Programming and Scripting

I want a script to view the complete log information of data stage job from UNIX IBM AIX.

Hi, I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment. Can you please help me out by give the script. Thanks in advance... (7 Replies)
Discussion started by: victory
7 Replies

4. UNIX for Dummies Questions & Answers

Plesk 9.5.4 CentOS 5 how to view log files?

Hello i have Plesk 9.5.4 CentOS 5 and after updating to 9.5.4 plesk told me there were some errors and to view a log file. Some problems occured during upgrade. You need to * * check log file * * ... (0 Replies)
Discussion started by: basslion
0 Replies

5. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

6. UNIX for Dummies Questions & Answers

View LOG messages

I want to view the content of /etc/log..I logged in as root and tried to open /etc/log using the command "gedit /etc/log" but didn't work out.How can i go about it?Thanks in advance.. (1 Reply)
Discussion started by: jois
1 Replies

7. Shell Programming and Scripting

Read Table,View,Package,Function and Procedure Name in a File

Hi I am new to Unix shell scripting. But i need help to slove the below issue. Issue description: I want to read table, view names and package names in a file my plan to find the table name is : search "From" key word find the table or view To find the packge name : Search "Package... (5 Replies)
Discussion started by: sboss
5 Replies

8. UNIX and Linux Applications

Log files to view job executed in Autosys -- Help ASAP

Hi all, I really need your help ASAP on this. Below is the description of my problem and a sketch of Autosys Job Activity Console ++++++++++++++++++++++++++++++++ File View Options +++++++++++++++++++++++++++++++ Job Name Description Status Command Machine... (1 Reply)
Discussion started by: sakal_woman
1 Replies

9. UNIX for Dummies Questions & Answers

view log files

i have this unix version "unix v/386" and i want to view the log files how i can do it? regards (5 Replies)
Discussion started by: sak900354
5 Replies

10. HP-UX

Open view log location

Can someone tell me where the path to store the error message in HP OpenView? thk a lot (0 Replies)
Discussion started by: zp523444
0 Replies
Login or Register to Ask a Question