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

am_log_is_level_enabled()

Checks whether an event at the specified level intended for the specified logging module should generate a logging message.

Details

If the level of the event is not equal to or higher than the level of the logging module, a logging message will not be generated.

Syntax

#include "am_log.h"
AM_EXPORT boolean_t
am_log_is_level_enabled(am_log_module_id_t moduleID,
                        am_log_level_t level);

Parameters

This function takes the following parameters:

moduleID

The identifier of the logging module.

level

The level of the event. Possible values are defined in the following am_log_level_t enumeration. The default value is AM_LOG_INFO.

typedef enum am_log_level {
    AM_LOG_ALWAYS = -1, /* always logged */
    AM_LOG_NONE,	/* never logged, typically used to turn off a module */
    AM_LOG_ERROR,	/* used for error messages */
    AM_LOG_WARNING,	/* used for warning messages */
    AM_LOG_INFO,	/* used for informational messages */
    AM_LOG_DEBUG,	/* used for debug messages */
    AM_LOG_MAX_DEBUG,    /* used for more detailed debug messages */
    AM_LOG_AUTH_REMOTE = 128, /* logged deny and/or allow */
    AM_LOG_AUTH_LOCAL = 256
} am_log_level_t;

Returns

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


Note –

The code used is dependent on the server operating system.


!0

If a message will be generated.

0

If a message will not be generated.