You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

log_event()

Usage

log_event(action, message, subject, object)
log_event(action, message, subject)
log_event(action, message)
log_event(map)

Description
Creates an entity of type LogEvent with the current timestamp and the given values. See Event Logging for more information on this topic.

All four parameters (action, message, subject and object) can be arbitrary strings. If the first (and only) parameter is a Structr object (i.e. a Map), the log event paramters are taken from that map.

Example

${log_event('VIEW', me.id)}

${{
    Structr.logEvent({
        action: "VIEW",
        message: Structr.me.id
    });
}}

Search results for "log_event()"

log_event()

Creates an entity of type LogEvent with the current timestamp and the given values.
All four parameters (action, message, subject and object) can be arbitrary strings.

In JavaScript, the function can be called with a single map as parameter. The event paramters are taken from that map.

log_event(action, message [, subject [, object ]])
$.logEvent(map)