LogEntry uses LogDataTrait
A sys log entry This model is 'complete': All current database properties are in there.
This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Properties
- $action : int
- Action ID of the action that happened, for example 3 was a file action
- $backendUserUid : int
- This is not a relation to BeUser model, since the user does not always exist, but we want the uid in then anyway.
- $channel : string
- Channel name.
- $details : string
- This is the log message itself, but possibly with %s substitutions.
- $detailsNumber : int
- Details number
- $error : int
- Error code
- $eventPid : int
- Event PID
- $ip : string
- IP address of client
- $level : string
- Level.
- $logData : string
- Serialized log data. This is a serialized array with substitutions for $this->details.
- $newId : string|int
- New ID
- $recordPid : int
- PID of the record the event happened to
- $recordUid : int
- UID of the record the event happened to
- $tableName : string
- Table name
- $tstamp : int
- Timestamp when the log entry was written
- $type : int
- Type code
- $uid : int<0, max>
- $workspaceUid : int
- This is only the UID and not the full workspace object for the same reason as in $beUserUid.
Methods
- createFromDatabaseRecord() : self
- getAction() : int
- getBackendUserUid() : int
- getChannel() : string
- getDetails() : string
- getDetailsNumber() : int
- getError() : int
- getErrorIconClass() : string
- getEventPid() : int
- getIp() : string
- getLevel() : string
- getLogData() : array<string|int, mixed>
- getLogDataRaw() : string
- getNewId() : string|int
- Get new id
- getRecordPid() : int
- getRecordUid() : int
- getTableName() : string
- getTstamp() : int
- getType() : int
- getUid() : int
- getWorkspaceUid() : int
- setError() : void
- setLogData() : void
- formatLogDetails() : string
- Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
- formatLogDetailsStatic() : string
- Static version for ViewHelpers etc.
- unserializeLogData() : array<string|int, mixed>|null
- Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.
Properties
$action
Action ID of the action that happened, for example 3 was a file action
protected
int
$action
= 0
$backendUserUid
This is not a relation to BeUser model, since the user does not always exist, but we want the uid in then anyway.
protected
int
$backendUserUid
= 0
This case is ugly in extbase, the best way we have found now is to resolve the username (if it exists) in a view helper and just use the uid of the be user here.
$channel
Channel name.
protected
string
$channel
= ''
$details
This is the log message itself, but possibly with %s substitutions.
protected
string
$details
= ''
$detailsNumber
Details number
protected
int
$detailsNumber
= 0
$error
Error code
protected
int
$error
= 0
$eventPid
Event PID
protected
int
$eventPid
= 0
$ip
IP address of client
protected
string
$ip
= ''
$level
Level.
protected
string
$level
= ''
$logData
Serialized log data. This is a serialized array with substitutions for $this->details.
protected
string
$logData
= ''
$newId
New ID
protected
string|int
$newId
= 0
$recordPid
PID of the record the event happened to
protected
int
$recordPid
= 0
$recordUid
UID of the record the event happened to
protected
int
$recordUid
= 0
$tableName
Table name
protected
string
$tableName
= ''
$tstamp
Timestamp when the log entry was written
protected
int
$tstamp
= 0
$type
Type code
protected
int
$type
= 0
$uid
protected
int<0, max>
$uid
= 0
$workspaceUid
This is only the UID and not the full workspace object for the same reason as in $beUserUid.
protected
int
$workspaceUid
= 0
Methods
createFromDatabaseRecord()
public
static createFromDatabaseRecord(array<string|int, mixed> $row) : self
Parameters
- $row : array<string|int, mixed>
Return values
selfgetAction()
public
getAction() : int
Return values
intgetBackendUserUid()
public
getBackendUserUid() : int
Return values
intgetChannel()
public
getChannel() : string
Return values
stringgetDetails()
public
getDetails() : string
Return values
stringgetDetailsNumber()
public
getDetailsNumber() : int
Return values
intgetError()
public
getError() : int
Return values
intgetErrorIconClass()
public
getErrorIconClass() : string
Return values
stringgetEventPid()
public
getEventPid() : int
Return values
intgetIp()
public
getIp() : string
Return values
stringgetLevel()
public
getLevel() : string
Return values
stringgetLogData()
public
getLogData() : array<string|int, mixed>
Return values
array<string|int, mixed>getLogDataRaw()
public
getLogDataRaw() : string
Return values
stringgetNewId()
Get new id
public
getNewId() : string|int
Return values
string|intgetRecordPid()
public
getRecordPid() : int
Return values
intgetRecordUid()
public
getRecordUid() : int
Return values
intgetTableName()
public
getTableName() : string
Return values
stringgetTstamp()
public
getTstamp() : int
Return values
intgetType()
public
getType() : int
Return values
intgetUid()
public
getUid() : int
Return values
intgetWorkspaceUid()
public
getWorkspaceUid() : int
Return values
intsetError()
public
setError(int $error) : void
Parameters
- $error : int
setLogData()
public
setLogData(string $logData) : void
Parameters
- $logData : string
formatLogDetails()
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
protected
formatLogDetails(string $detailString, mixed $substitutes) : string
Parameters
- $detailString : string
- $substitutes : mixed
Return values
stringformatLogDetailsStatic()
Static version for ViewHelpers etc.
protected
static formatLogDetailsStatic(string $detailString, array<string|int, mixed> $substitutes) : string
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
Parameters
- $detailString : string
- $substitutes : array<string|int, mixed>
Return values
stringunserializeLogData()
Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.
protected
unserializeLogData(mixed $logData) : array<string|int, mixed>|null
Parameters
- $logData : mixed