Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to write code for a Logging Event? Post 302579487 by theKbStockpiler on Monday 5th of December 2011 08:18:27 PM
Old 12-05-2011
Lets say I'm trying to write to a file and the operation of doing this fails. Wouldn't I have to write additional code to make sure every outcome of my code was successful ,make sure data was written to the said file? If an error is not checked the application will just go on running code. An error is only an error if it is defined as one, otherwise the CPU continues running the code with erroneous data.

An analogy would be checking a simple mathematical addition equation by subtracting one of the addends from the sum to see if the other addend was left. If this check is not made we are not aware of the error and computations using this faulty data continue.


This webpage gives my original post some structure http://wiki.webratio.com/index.php/Debugging_with_application's_logs

I got to this topic indirectly from ELF files so that won't help much. Let's say I'm writing an application and think it will be useful to have some log files to view so when it crashes I will have a clue of what to look at to solve the problems the application is experiencing.

Last edited by theKbStockpiler; 12-05-2011 at 09:58 PM..
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How does Unix write events into event log?

Hi to everyone. I'm new to this forum and also pretty new to Unix. I'm developing a cross-platform software and I need to register informational and error messages into the event log of the system. Under Windows, this is implemented so far, I need to implement it unded Unix by now. I do know that... (7 Replies)
Discussion started by: mariano_donati
7 Replies

2. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

3. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

4. Shell Programming and Scripting

Logging success event into file

Hi, I've the following code to log the errors any after the command is executed. # Ksh 88 Version log_path=/home/etc/fls/fls_log.log del_path=/home/etc/fls/to_day rm $del_path/* >> $log_path 2>&1 But I even want to log if the rm command is success without any error along with... (1 Reply)
Discussion started by: smile689
1 Replies

5. Linux

Syslog not logging successful logging while unlocking server's console

When unlocking a Linux server's console there's no event indicating successful logging Is there a way I can fix this ? I have the following in my rsyslog.conf auth.info /var/log/secure authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies
WWW::Facebook::API::Permissions(3pm)			User Contributed Perl Documentation		      WWW::Facebook::API::Permissions(3pm)

NAME
WWW::Facebook::API::Permissions - Facebook Permissions SYNOPSIS
Implementation of the Facebook Permissions API: use WWW::Facebook::API; # setup, etc # see below for full documentation $client->permissions->grant_api_access( ... ); $client->permissions->check_available_api_access( ... ); $client->permissions->revoke_api_access( ... ); $client->permissions->check_granted_api_access( ... ); DESCRIPTION
Methods for accessing Permissions functions with WWW::Facebook::API SUBROUTINES
/METHODS begin($call_as_apikey) Mimics "begin_permissions_mode" of official PHP API. Successive calls will automatically insert the "call_as_apikey" key and whatever value is passed in as <$call_as_apikey>. $client->permissions->begin( call_as_apikey => $key, ); end Mimics "end_permissions_mode" of official PHP API. Opposite of "begin". $client->permissions->end( call_as_apikey => $key, ); grant_api_access This method gives another application access to certain API calls on behalf of the application calling it. You MUST supply the API key of the application you want to grant access to. You MAY also supply an array of methods/namespaces for which access should be granted. $client->permissions->grant_api_access( permissions_apikey => $otherkey, method_arr => '["admin."]' ); <http://wiki.developers.facebook.com/index.php/Permissions.grantApiAccess> check_available_api_access This method returns the API methods to which access has been granted by the specified application. You MUST supply the API key of the application you want to check. $client->permissions->check_available_api_access( permissions_apikey => $master_key ); <http://wiki.developers.facebook.com/index.php/Permissions.checkAvailableApiAccess> revoke_api_access This method revokes the API access granted to the specified application. You MUST supply the API key of the application for which you want to revoke access. $client->permissions->revoke_api_access( permissions_apikey => $other_key ); <http://wiki.developers.facebook.com/index.php/Permissions.revokeApiAccess> check_granted_api_access This method returns the API methods to which the specified application has been given access. You MUST supply the API key of the application for which you want the check to be made. $client->permissions->check_granted_api_access( permissions_apikey => $other_key ); <http://wiki.developers.facebook.com/index.php/Permissions.checkGrantedApiAccess> BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to "bug-www-facebook-api@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. AUTHORS
Pedro Figueiredo, "<pedro.figueiredo at playfish.com>" David Romano "<unobe@cpan.org>" SUPPORT
You can find documentation for this module with the perldoc command. perldoc WWW::Facebook::API::Permissions You can also look for information at: COPYRIGHT &; LICENSE Copyright (c) 2010 Playfish. All Rights reserved. Certain parts copyright (c) 2010, David Romano "<unobe@cpan.org>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.10.1 2010-03-13 WWW::Facebook::API::Permissions(3pm)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy