Tornado API Reference : Target Server Internal Routines

wpwrlog

NAME

wpwrlog - wpwr log utilities library

ROUTINES

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.

DESCRIPTION

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

#include "wpwrlog.h"

LIBRARY

Those routines are available when linking with the libwpwr shared lib.

SEE ALSO

wpwrlog, API Programmer's Guide: Target Server Back End


Target Server Internal Routines : Routines

wpwrLogHeaderSet( )

NAME

wpwrLogHeaderSet( ) - set the message header

SYNOPSIS

 
void wpwrLogHeaderSet (void)

DESCRIPTION

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 1998
After 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.

RETURNS

N/A

SEE ALSO

wpwrlog


Target Server Internal Routines : Routines

wpwrLogRaw( )

NAME

wpwrLogRaw( ) - log a raw message to stderr

SYNOPSIS

void wpwrLogRaw
    (
    char * fmt /* error message to log */
    )

DESCRIPTION

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.

RETURNS

N/A

SEE ALSO

wpwrlog


Target Server Internal Routines : Routines

wpwrLogMsg( )

NAME

wpwrLogMsg( ) - log a message.

SYNOPSIS

void wpwrLogMsg
    (
    char * fmt /* error message to log */
    )

DESCRIPTION

This routine prints the caller's message formatted as follows:

command_name (symbolic_name): timestamp
    users_message

Example :

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 ().

RETURNS

N/A

SEE ALSO

wpwrlog


Target Server Internal Routines : Routines

wpwrLogWarn( )

NAME

wpwrLogWarn( ) - log a warning message.

SYNOPSIS

void wpwrLogWarn
    (
    char * fmt /* error message to log */
    )

DESCRIPTION

This routine prints the caller's warning message , formatted as follows:

command_name (symbolic_name): timestamp
    Warning: users_message

Example :

tgtsvr (t80-206@couesnon): Tue Jun  9 15:19:56 1998
Warning: Can't checksum core file: request not supported by the Target Agent
The header is printed only at the first invocation after a call to wpwrLogHeaderSet ().

RETURNS

N/A

SEE ALSO

wpwrlog


Target Server Internal Routines : Routines

wpwrLogErr( )

NAME

wpwrLogErr( ) - log an error message.

SYNOPSIS

void wpwrLogErr
    (
    char * fmt /* error message to log */
    )

DESCRIPTION

This routine prints the caller's error message, formatted as follows :

command_name (symbolic_name): timestamp
    Error: users_message

Example :

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 ().

RETURNS

N/A

SEE ALSO

wpwrlog