Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:logginevent [2007/10/11 09:06]
ravith
dev:logginevent [2009/07/06 20:36] (current)
Line 22: Line 22:
 )</code> )</code>
  
-Parameter description.+Parameter description. \\
  
-   * data_item_UUID - The UUID of a data item which the log record is related to. (optional) +   **''data_item_UUID''** - The UUID of a data item which the log record is related to. (optional) 
-   * comments - A breif log messsage. (required) +   **''comments''** - A breif log messsage. (required) 
-   * details - A detailed log message. (optional) +   **''details''** - A detailed log message. (optional) 
-   * log_level - The log level +   **''log_level''** - The log level 
-   * log_sensitivity - The sensitivity of this log message. +   **''log_sensitivity''** - The sensitivity of this log message. 
-   * date_time - The date and time in the format returned by php date function - date("Y-m-d H:i:s"+   **''date_time''** - The date and time in the format returned by php date function - date("Y-m-d H:i:s"
-   * module - The name of the module, if not specified (if null) it will be determined from $global['module'+   **''module''** - The name of the module, if not specified (if null) it will be determined from $global['module'
-   * action - The name of the action, if not specified (if null) it will be determined from $global['action'+   **''action''** - The name of the action, if not specified (if null) it will be determined from $global['action'
-   * extra_opts - any extra options as an associate array. This array will be parsed in to key-value pairs in the form of <key>value</key> and will be recorded as text. eg. Longitude, Latitude, etc.+   **''extra_opts''** - any extra options as an associate array. This array will be parsed in to key-value pairs in the form of <key>value</key> and will be recorded as text. \\ eg. Longitude, Latitude, etc.
  
  
-There are five levels of logging, namely+**There are five levels of logging, namely**
  
-  * INFO   - Information log records. +  * **INFO**   - Information log records. 
-  * DEBUG  - Debugging log records. +  * **DEBUG**  - Debugging log records. 
-  * WARN   - Warnings +  * **WARN**   - Warnings 
-  * ERROR  - Errors +  * **ERROR**  - Errors 
-  * FATAL  - Fatal Errors+  * **FATAL**  - Fatal Errors
  
-**__//''These levels are defined as constants in lib_log.inc''//__**+**__//''These levels are defined as constants in lib_log.inc''//__** \\ \\ 
 +The log level defaults to **INFO**. \\
  
-There are eight levels of log sensitivity. +**There are nine levels of log sensitivity.**
-The log level defaults to INFO.+
  
-   * PERSON_SENSITIVE +   * **PERSON_SENSITIVE** 
-   * ORGANIZATION_SENSITIVE +   * **ORGANIZATION_SENSITIVE** 
-   * LEAGALLY_SENSITIVE +   * **LEAGALLY_SENSITIVE** 
-   * NATIONAL_SECURITY_SENSITIVE +   * **NATIONAL_SECURITY_SENSITIVE** 
-   * SOCIALLY_SENSITIVE +   * **SOCIALLY_SENSITIVE** 
-   * DISASTER_MITIGATION_SENSITIVE +   * **DISASTER_MITIGATION_SENSITIVE** 
-   * SYSTEM_SENSITIVE +   * **SYSTEM_SENSITIVE** 
-   * NOT_SENSITIVE +   * **NOT_SENSITIVE** 
-   * UNCLASSIFIED+   * **UNCLASSIFIED**
  
-**__//''These levels are defined as constants in lib_log.inc''//__** +**__//''These levels are defined as constants in lib_log.inc''//__** \\ \\ 
- +The senisitvity level defaults to **NOT_SENSITIVE** \\
-The senisitvity level defaults to NOT_SENSITIVE+
  
  
Line 86: Line 85:
 **//''Name:''//** debug.inc **//''Name:''//** debug.inc
  
-The default method of logging (to file or to database) can be configured in the sysconf.inc under $conf['default_logger']. The log messages will be printed as HTML if the configured logger cannot be created or not found.+The default method of logging (to file or to database) can be configured in the sysconf.inc under $conf['default_logger']. \\The log messages will be printed as HTML if the configured logger cannot be created or not found. \\
 A custom logger can be created by extending the class Logger and overriding the log_message() function. A custom logger can be created by extending the class Logger and overriding the log_message() function.
  
Line 103: Line 102:
 </code> </code>
  
 +**//''Usage:''//** \\
 +The logging API **MUST** be used in the following and similar instances, additionally the module developer is free to use it else where.\\
 + \\
 +  * When a write commit is made to the database
 +  * On a configuration change
 +  * On a important event in the business logic of the module
 +  * On an error
 +  * On a security violation or suspicious action
  
 +The log messages should be recorded with the appropriate logging level, and sensitivity level, to make event audit more efficient.
 \\ \\
 **//''Author:''//** \\ **//''Author:''//** \\
 //Ravith Botejue.// //Ravith Botejue.//

Navigation
QR Code
QR Code dev:logginevent (generated for current page)