Sun OpenSSO Enterprise 8.0 C API Reference for Application and Web Policy Agent Developers

am_log_add_module()

Adds a new logging file (for a specific function or feature) to the OpenSSO Enterprise Logging Service.

Details

The currently used module file names are:

Syntax

#include "am_log.h"
AM_EXPORT am_status_t
am_log_add_module(const char *name,
                  am_log_module_id_t *id_ptr);

Parameters

This function takes the following parameters:

name

Pointer to the name associated with the new module.

id_ptr

Pointer to the location where the identifier for the logging module is stored.

Returns

This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):


Note –

If a module of the same name already exists, the module identifier of the existing module is returned.


AM_SUCCESS

If the addition was successful.

AM_INVALID_ARGUMENT

If name or id_ptr is NULL.

AM_NSPR_ERROR

If unable to initialize the logging framework.

AM_NO_MEMORY

If unable to allocate memory for the new module.

AM_FAILURE

If any other error is detected.