Logs
in package
implements
ActionInterface
uses
ActionTrait, BackwardCompatibility
Dispatcher to show various kinds of logs.
Table of Contents
Interfaces
- ActionInterface
- Interface for all action classes.
Properties
- $prune_toggle : array<string|int, mixed>
- $subaction : string
- $subactions : array<string|int, mixed>
- $obj : static
Methods
- adminlog() : void
- Hands execution over to Modlog::call().
- banlog() : void
- Hands execution over to Bans::log().
- call() : void
- Convenience method to load() and execute() an instance of this class.
- canBeLogged() : bool
- Determines whether this action can be logged in the online log.
- canShowDebuggingInfo() : bool
- Determines whether debugging info should be shown.
- canShowInMaintenanceMode() : bool
- Determines whether this action allows access in maintenance mode.
- errorlog() : void
- Hands execution over to ErrorLog::view().
- execute() : void
- This function decides which log to load.
- getConfigVars() : array<string|int, mixed>
- Gets the configuration variables for this admin area.
- getOutputType() : OutputTypeInterface
- Gets the output type for this action.
- isAgreementAction() : bool
- Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
- isRestrictedGuestAccessAllowed() : bool
- Determines whether this action allows access if guest access is restricted.
- isSimpleAction() : bool
- Determines whether this is a simple action.
- load() : static
- Static wrapper for constructor.
- modlog() : void
- Hands execution over to Modlog::call().
- settings() : void
- Allow to edit the settings on the pruning screen.
- spiderlog() : void
- Hands execution over to SearchEngines::logs().
- subActionProvider() : null|array<string|int, mixed>
- Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods
- tasklog() : void
- Hands execution over to Tasks::log().
- __construct() : mixed
- Constructor. Protected to force instantiation via self::load().
Properties
$prune_toggle
public
static array<string|int, mixed>
$prune_toggle
= ['pruneErrorLog', 'pruneModLog', 'pruneBanLog', 'pruneReportLog', 'pruneScheduledTaskLog', 'pruneSpiderHitLog']
Logs that can be toggled on or off for a nice user experience.
MOD AUTHORS: If you want to your log to be magically hidden when the 'pruning' option is off, use the integrate_prune_settings hook to add it to this list.
$subaction
public
string
$subaction
= 'errorlog'
The requested sub-action. This should be set by the constructor.
$subactions
public
static array<string|int, mixed>
$subactions
= ['errorlog' => [
'',
'errorlog',
// At runtime, will be set to empty(Config::$modSettings['enableErrorLogging'])
'disabled' => 'enableErrorLogging',
], 'adminlog' => [
'',
'adminlog',
// At runtime, will be set to empty(Config::$modSettings['adminlog_enabled'])
'disabled' => 'adminlog_enabled',
], 'modlog' => [
'',
'modlog',
// At runtime, will be set to empty(Config::$modSettings['modlog_enabled'])
'disabled' => 'modlog_enabled',
], 'banlog' => ['', 'banlog'], 'spiderlog' => [
'',
'spiderlog',
// At runtime, will be set to empty(Config::$modSettings['spider_mode'])
'disabled' => 'spider_mode',
], 'tasklog' => ['', 'tasklog'], 'settings' => ['', 'settings']]
These are the logs they can load.
Format: 'sa' => array('file', 'function', 'disabled' => 'setting_to_check')
$obj
protected
static static
$obj
An instance of this class. This is used by the load() method to prevent multiple instantiations.
Methods
adminlog()
Hands execution over to Modlog::call().
public
adminlog() : void
banlog()
Hands execution over to Bans::log().
public
banlog() : void
call()
Convenience method to load() and execute() an instance of this class.
public
static call() : void
canBeLogged()
Determines whether this action can be logged in the online log.
public
canBeLogged() : bool
Return values
boolcanShowDebuggingInfo()
Determines whether debugging info should be shown.
public
canShowDebuggingInfo() : bool
Return values
boolcanShowInMaintenanceMode()
Determines whether this action allows access in maintenance mode.
public
canShowInMaintenanceMode() : bool
Return values
bool —True if access is allowed, false otherwise.
errorlog()
Hands execution over to ErrorLog::view().
public
errorlog() : void
execute()
This function decides which log to load.
public
execute() : void
getConfigVars()
Gets the configuration variables for this admin area.
public
static getConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed> —$config_vars for the logs area.
getOutputType()
Gets the output type for this action.
public
getOutputType() : OutputTypeInterface
Return values
OutputTypeInterfaceisAgreementAction()
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
public
isAgreementAction() : bool
Return values
boolisRestrictedGuestAccessAllowed()
Determines whether this action allows access if guest access is restricted.
public
isRestrictedGuestAccessAllowed() : bool
Return values
bool —True if access is allowed, false otherwise.
isSimpleAction()
Determines whether this is a simple action.
public
isSimpleAction() : bool
Return values
boolload()
Static wrapper for constructor.
public
static load() : static
Return values
static —An instance of this class.
modlog()
Hands execution over to Modlog::call().
public
modlog() : void
settings()
Allow to edit the settings on the pruning screen.
public
settings() : void
spiderlog()
Hands execution over to SearchEngines::logs().
public
spiderlog() : void
subActionProvider()
Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods
public
static subActionProvider([null|string $sa = null ][, bool $return_config = false ][, string|null $activity = null ]) : null|array<string|int, mixed>
Parameters
- $sa : null|string = null
- $return_config : bool = false
- $activity : string|null = null
Return values
null|array<string|int, mixed>tasklog()
Hands execution over to Tasks::log().
public
tasklog() : void
__construct()
Constructor. Protected to force instantiation via self::load().
protected
__construct() : mixed