Class BP_Log

Description

Provides easy and abstracted logging facilities

Located in /includes/class.bp-log.php (line 26)


	
			
Variable Summary
Method Summary
void BP_log ([ $level = false], [ $type = false], [ $filename = false])
boolean debug ( $message, [ $prefix = false])
boolean error ( $message)
boolean fail ( $message)
boolean format_message ( $message, [ $level = BP_LOG_DEBUG], [ $prefix = false], [ $tabs = 0])
string get_level_from_integer ( $integer)
boolean notice ( $message)
boolean send ([ $message = ''], [ $level = BP_LOG_DEBUG], [ $type = false], [ $prefix = false])
string|boolean set_filename ( $filename)
integer|boolean set_level ( $level)
string|false set_type ( $type)
boolean warning ( $message)
void _esc_js_log ( $message)
Variables
boolean $console_javascript_loaded = false (line 61)

Whether or not the javascript functions are available

array $console_javascript_onloads = array() (line 68)

Console log messages which are queued up to be displayed on page load

string $filename = '' (line 54)

The filename of the file to log messages to when type is "file"

integer $level = BP_LOG_NONE (line 33)

The logging level

string $type = 'php' (line 40)

The type of logging

array $types = array('php', 'file', 'display', 'console') (line 47)

The types of logging available

Methods
BP_log (line 75)

Initialises the logging

void BP_log ([ $level = false], [ $type = false], [ $filename = false])
  • $level
  • $type
  • $filename
console_javascript (line 471)

Outputs javascript functions for the head of the html document

Must be included in the head of the debug document somehow when using 'console' type.

void console_javascript ()
debug (line 385)

Send a debug message

  • return: True on success, false on failure
boolean debug ( $message, [ $prefix = false])
  • $message
  • $prefix
error (line 433)

Send an error message

If the message is an array, then it sends each index as a separate message

  • return: True on success, false on failure
boolean error ( $message)
  • $message
fail (line 451)

Send an error message and die

If the message is an array, then it sends each index as a separate message

  • return: True on success, false on failure
boolean fail ( $message)
  • $message
format_message (line 317)

Formats a message for output to a log file

  • return: True on success, false on failure
boolean format_message ( $message, [ $level = BP_LOG_DEBUG], [ $prefix = false], [ $tabs = 0])
  • $message
  • $level
  • $prefix
  • $tabs
get_level_from_integer (line 285)

Gets the name of the log level from an integer

  • return: The logging level
string get_level_from_integer ( $integer)
  • $integer
notice (line 397)

Send a notice message

If the message is an array, then it sends each index as a separate message

  • return: True on success, false on failure
boolean notice ( $message)
  • $message
send (line 157)

Sends a message to the log

  • return: True on success, false on failure
boolean send ([ $message = ''], [ $level = BP_LOG_DEBUG], [ $type = false], [ $prefix = false])
  • $message
  • $level
  • $type
  • $prefix
set_filename (line 131)

Sets the logging filename

  • return: The old filename on success or false
  • uses: BP_LOG_FILENAME
string|boolean set_filename ( $filename)
  • $filename
set_level (line 88)

Sets the logging level

  • return: The old level on success or false
  • uses: BP_LOG_LEVEL
integer|boolean set_level ( $level)
  • $level
set_type (line 109)

Sets the logging type

  • return: The old type on success or false
  • uses: BP_LOG_TYPE
string|false set_type ( $type)
  • $type
warning (line 415)

Send a warning message

If the message is an array, then it sends each index as a separate message

  • return: True on success, false on failure
boolean warning ( $message)
  • $message
_esc_js_log (line 541)
void _esc_js_log ( $message)
  • $message

Documentation generated on Fri, 18 May 2012 01:33:40 +0100 by phpDocumentor 1.4.3