Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Namespaces | Functions | Variables
system_log.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Functions

 get_system_log ($by_user="", $event="", $class="", $type="", $subtype="", $limit=null, $offset=0, $count=false, $timebefore=0, $timeafter=0, $object_id=0, $ip_address="")
 Retrieve the system log based on a number of parameters. More...
 
 get_log_entry ($entry_id)
 Return a specific log entry. More...
 
 get_object_from_log_entry ($entry)
 Return the object referred to by a given log entry. More...
 
 system_log ($object, $event)
 Log a system event related to a specific object. More...
 
 archive_log ($offset=0)
 This function creates an archive copy of the system log. More...
 
 system_log_default_logger ($event, $object_type, $object)
 Default system log handler, allows plugins to override, extend or disable logging. More...
 
 system_log_listener ($event, $object_type, $object)
 System log listener. More...
 

Variables

return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

archive_log (   $offset = 0)

This function creates an archive copy of the system log.

Parameters
int$offsetAn offset in seconds from now to archive (useful for log rotation)
Returns
bool

Definition at line 264 of file system_log.php.

get_log_entry (   $entry_id)

Return a specific log entry.

Parameters
int$entry_idThe log entry
Returns
mixed

Definition at line 124 of file system_log.php.

get_object_from_log_entry (   $entry)

Return the object referred to by a given log entry.

Parameters
\stdClass | int$entryThe log entry row or its ID
Returns
mixed

Definition at line 139 of file system_log.php.

get_system_log (   $by_user = "",
  $event = "",
  $class = "",
  $type = "",
  $subtype = "",
  $limit = null,
  $offset = 0,
  $count = false,
  $timebefore = 0,
  $timeafter = 0,
  $object_id = 0,
  $ip_address = "" 
)

Retrieve the system log based on a number of parameters.

Parameters
int | array$by_userThe guid(s) of the user(s) who initiated the event. Use 0 for unowned entries. Anything else falsey means anyone.
string$eventThe event you are searching on.
string$classThe class of object it effects.
string$typeThe type
string$subtypeThe subtype.
int$limitMaximum number of responses to return. (default from settings)
int$offsetOffset of where to start.
bool$countReturn count or not
int$timebeforeLower time limit
int$timeafterUpper time limit
int$object_idGUID of an object
string$ip_addressThe IP address.
Returns
mixed

Definition at line 30 of file system_log.php.

system_log (   $object,
  $event 
)

Log a system event related to a specific object.

This is called by the event system and should not be called directly.

Parameters
object$objectThe object you're talking about.
string$eventThe event being logged
Returns
void

Definition at line 191 of file system_log.php.

system_log_default_logger (   $event,
  $object_type,
  $object 
)

Default system log handler, allows plugins to override, extend or disable logging.

Parameters
string$eventEvent name
string$object_typeObject type
Loggable$objectObject to log
Returns
true

Definition at line 303 of file system_log.php.

system_log_listener (   $event,
  $object_type,
  $object 
)

System log listener.

This function listens to all events in the system and logs anything appropriate.

Parameters
String$eventEvent name
String$object_typeType of object
Loggable$objectObject to log
Returns
true private

Register event to listen to all events

Register a default system log handler

Definition at line 320 of file system_log.php.

Variable Documentation

Definition at line 328 of file system_log.php.