\MainWP\Dashboard\Module\LogLog

Class Logs

Summary

Methods
Properties
Constants
__construct()
log()
debug_backtrace()
$manager
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$ip_address
N/A

Properties

$manager

$manager : \MainWP\Dashboard\Module\Log\manager

Log_Manager

Type

\MainWP\Dashboard\Module\Log\manager — Hold Log_Manager class

$ip_address

$ip_address : string

Hold Current visitors IP Address.

Type

string — Hold Current visitors IP Address.

Methods

__construct()

__construct(\MainWP\Dashboard\Module\Log\Log_Manager  $manager) 

Log constructor.

Run each time the class is called.

Parameters

\MainWP\Dashboard\Module\Log\Log_Manager $manager

The main manager class.

log()

log(\MainWP\Dashboard\Module\Log\Connector  $connector, string  $message, array  $args, integer  $site_id, string  $context, string  $action, integer|null  $state = null, integer  $user_id = null) : boolean|\MainWP\Dashboard\Module\Log\WP_Error

Log handler.

Parameters

\MainWP\Dashboard\Module\Log\Connector $connector

Connector responsible for logging the event.

string $message

sprintf-ready error message string.

array $args

sprintf (and extra) arguments to use.

integer $site_id

Target site id.

string $context

Context of the event.

string $action

Action of the event.

integer|null $state

action status: null - N/A, 0 - failed, 1 - success.

integer $user_id

User responsible for the event.

Returns

boolean|\MainWP\Dashboard\Module\Log\WP_Error —

True if updated, otherwise false|WP_Error

debug_backtrace()

debug_backtrace(array  $recordarr) : string

Helper function to send a full backtrace of calls to the PHP error log for debugging.

Parameters

array $recordarr

Record argument array.

Returns

string —

$output MainWP Pro Reports backtrace.