The logging API is designed to allow C applications to produce messages of interest and write them to the Access Manager logs. When some type of event occurs in an external application, the application code first determines if the logging module (a file created for messages usually relevant to a specific function or feature) to which the event is relevant has a level high enough to log the event. (A level specifies importance and defines the amount of detail that will be logged.) If the determination is affirmative, a log message is generated and a log record created in the relevant logging module. Information in the log record can be updated as necessary. The following notes regard the logging API for C functionality:
The am_log_init() function by the application must be called before using any other am_log_* interfaces. If either the SSO, authentication, or policy initialization functions (am_sso_init(), am_auth_init(), or am_policy_init()) are called, am_log_init() does not need to be called as each of the three aforementioned functions call am_log_init() internally.
The am_log_record_* interfaces can be used to set or update information in the log record. They include:
The following are convenience functions that provide simplified access to existing log records. They include: