engine/lib/system_log.php File Reference

(r6838/r5927)

Go to the source code of this file.

Classes

interface  Loggable
 Interface that provides an interface which must be implemented by all objects wishing to be recorded in the system log (and by extension the river). More...

Packages

package  Elgg
 

Elgg CSS file.


Functions

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

Function Documentation

archive_log ( offset = 0  ) 

This function creates an archive copy of the system log.

Parameters:
int $offset An offset in seconds from now to archive (useful for log rotation)

Definition at line 241 of file system_log.php.

References $CONFIG, $offset, $ts, delete_data(), and update_data().

Referenced by logrotate_cron().

get_log_entry ( entry_id  ) 

Return a specific log entry.

Parameters:
int $entry_id The log entry

Definition at line 153 of file system_log.php.

References $CONFIG, and get_data_row().

Referenced by get_object_from_log_entry().

get_object_from_log_entry ( entry_id  ) 

Return the object referred to by a given log entry.

Parameters:
int $entry_id The log entry

Definition at line 166 of file system_log.php.

References $class, $entry, $object, and get_log_entry().

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

Retrieve the system log based on a number of parameters.

Parameters:
int or array $by_user The guid(s) of the user(s) who initiated the event.
string $event The event you are searching on.
string $class The class of object it effects.
string $type The type
string $subtype The subtype.
int $limit Maximum number of responses to return.
int $offset Offset of where to start.
bool $count Return count or not

Definition at line 73 of file system_log.php.

References $class, $CONFIG, $count, $event, $limit, $offset, $query, $subtype, $type, get_data(), get_data_row(), and sanitise_string().

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 The object you're talking about.
$event String The event being logged

Definition at line 190 of file system_log.php.

References $access_id, $CONFIG, $event, $object, $owner_guid, $performed_by, $time, get_loggedin_userid(), insert_data(), and sanitise_string().

Referenced by create_annotation(), and system_log_default_logger().

system_log_default_logger ( event,
object_type,
object 
)

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

Parameters:
string $event
string $object_type
Loggable $object
Returns:
unknown

Definition at line 276 of file system_log.php.

References $object, and system_log().

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 $event
String $object_type
Loggable $object

Definition at line 290 of file system_log.php.

References $event, $object, and trigger_elgg_event().

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Thu Sep 2 00:13:01 2010 for Elgg by  doxygen 1.6.3