Tornado API Reference : Target Server Internal Routines
wpwrlog - wpwr log utilities library
wpwrLogHeaderSet( ) - set the message header
wpwrLogRaw( ) - log a raw message to stderr
wpwrLogMsg( ) - log a message.
wpwrLogWarn( ) - log a warning message.
wpwrLogErr( ) - log an error message.
This library contains the logging facility used by the Tornado tools, and the target server. There are three kinds of logs : Information, Warnings and Errors. A fourth type (Raw) permits adding information immediately after an other logging message. A header (tool name and date) is displayed each time the logging context is modified (i.e, each time wpwrLogHeaderSet( ) is set).
#include "wpwrlog.h"
Those routines are available when linking with the libwpwr shared lib.
wpwrlog, API Programmer's Guide: Target Server Back End
wpwrLogHeaderSet( ) - set the message header
void wpwrLogHeaderSet (void)
This routine prepares a message header. This header will be displayed later by wpwrLogMsg (), wpwrLogWarn () or wpwrLogErr (). A message header holds the following information:
command_name (caller_symbolic_ID): timestamp
Example :
tgtsvr (t80-206@couesnon): Tue Jun 9 15:19:56 1998After the header has been displayed by a logging function, it must be reset by a call to wpwrLogHeaderSet () in order to print it again. This routine should be called on a regular basis, since the header is printed only once otherwise.
N/A
wpwrLogRaw( ) - log a raw message to stderr
void wpwrLogRaw ( char * fmt /* error message to log */ )
This routine prints the caller's message. This routine should be used only to add information immediately after a message string printed by one of the other logging functions. The informations will be printed on the same line.
N/A
wpwrLogMsg( ) - log a message.
void wpwrLogMsg ( char * fmt /* error message to log */ )
This routine prints the caller's message formatted as follows:
command_name (symbolic_name): timestamp
users_messageExample :
tgtsvr (t80-206@couesnon): Tue Jun 9 15:19:56 1998 Connecting to target agent...The header is printed only at the first invocation after a call to wpwrLogHeaderSet ().
N/A
wpwrLogWarn( ) - log a warning message.
void wpwrLogWarn ( char * fmt /* error message to log */ )
This routine prints the caller's warning message , formatted as follows:
command_name (symbolic_name): timestamp
Warning: users_messageExample :
tgtsvr (t80-206@couesnon): Tue Jun 9 15:19:56 1998 Warning: Can't checksum core file: request not supported by the Target AgentThe header is printed only at the first invocation after a call to wpwrLogHeaderSet ().
N/A
wpwrLogErr( ) - log an error message.
void wpwrLogErr ( char * fmt /* error message to log */ )
This routine prints the caller's error message, formatted as follows :
command_name (symbolic_name): timestamp
Error: users_messageExample :
tgtsvr (t80-206@couesnon): Tue Jun 9 15:19:56 1998 Error: Your license is now invalid.The header is printed only at the first invocation after a call to The header is printed only at the first invocation after a call to wpwrLogHeaderSet ().
N/A