logs
in package
Class that handles logs
Table of Contents
Properties
- $apachelog : apachelog
- $dberrorlog : dberrorlog
- $dblog : dblog
- $maillog : maillog
- $phplog : phplog
- $systemlog : systemlog
Methods
- __construct() : mixed
- Constructs a new instance of the class.
- __destruct() : mixed
- Destructor method to clean up and release resources.
- apacheall() : array<string|int, mixed>|false
- Retrieves Apache logs based on the specified page.
- apacheclear() : bool
- Clears the Apache logs.
- apachecount() : string
- Returns the count of the apachelog.
- dball() : array<string|int, mixed>|false
- Retrieves database logs based on the specified page.
- dbclear() : bool
- Clears the database logs.
- dbcount() : string
- Returns the count of the dblog.
- dberrorall() : array<string|int, mixed>|false
- Retrieves database error logs based on the specified page.
- dberrorclear() : bool
- Clears the database error log.
- dberrorcount() : string
- Retrieves the count of database error logs.
- dberrorinsert() : bool
- Inserts a database error log with the specified message.
- generatelogsaccordion() : string
- mailall() : array<string|int, mixed>|false
- Retrieves mail logs based on the specified page.
- mailclear() : bool
- Clears the mail log.
- mailcount() : string
- Retrieves the count of mail logs.
- mailinsert() : bool
- Inserts a new mail log entry.
- mailupdate() : bool
- Updates a specific column, in a specific row of the mail log table with the specified value.
- phpall() : array<string|int, mixed>|false
- Retrieves PHP logs based on the specified page.
- phpclear() : bool
- Clears all PHP logs.
- phpcount() : string
- Returns the count of the phplog.
- systemall() : array<string|int, mixed>|bool
- Retrieves all system logs.
- systemclear() : bool
- Clears the system log.
- systemcount() : string
- Returns the count of the systemlog.
- systeminsert() : bool
- Inserts a system log entry with the specified message and request data.
- systeminsertwparam() : bool
- Inserts a system log with additional parameters.
- gensystemdberrorarray() : array<string|int, mixed>
- Generates an array of system database errors based on the specified page, type, and logs.
Properties
$apachelog
protected
apachelog
$apachelog
$dberrorlog
protected
dberrorlog
$dberrorlog
$dblog
protected
dblog
$dblog
$maillog
protected
maillog
$maillog
$phplog
protected
phplog
$phplog
$systemlog
protected
systemlog
$systemlog
Methods
__construct()
Constructs a new instance of the class.
public
__construct() : mixed
Initializes the systemlog, apachelog, phplog, dblog, dberrorlog, and maillog objects.
__destruct()
Destructor method to clean up and release resources.
public
__destruct() : mixed
apacheall()
Retrieves Apache logs based on the specified page.
public
apacheall([string $pg = '1' ]) : array<string|int, mixed>|false
Parameters
- $pg : string = '1'
-
The page number. Defaults to '1'.
Return values
array<string|int, mixed>|false —An array of Apache logs if successful, false otherwise.
apacheclear()
Clears the Apache logs.
public
apacheclear() : bool
Return values
bool —True if the Apache logs were successfully cleared, false otherwise.
apachecount()
Returns the count of the apachelog.
public
apachecount() : string
Return values
string —The count of the apachelog if available, otherwise '0'.
dball()
Retrieves database logs based on the specified page.
public
dball([string $pg = '1' ]) : array<string|int, mixed>|false
Parameters
- $pg : string = '1'
-
The page number. Defaults to '1'.
Return values
array<string|int, mixed>|false —An array of database logs if successful, false otherwise.
dbclear()
Clears the database logs.
public
dbclear() : bool
Return values
bool —True if the database logs were cleared successfully, false otherwise.
dbcount()
Returns the count of the dblog.
public
dbcount() : string
Return values
string —The count of the dblog if available, otherwise '0'.
dberrorall()
Retrieves database error logs based on the specified page.
public
dberrorall([string $pg = '1' ]) : array<string|int, mixed>|false
Parameters
- $pg : string = '1'
-
The page number. Defaults to '1'.
Return values
array<string|int, mixed>|false —An array of database error logs if successful, false otherwise.
dberrorclear()
Clears the database error log.
public
dberrorclear() : bool
Return values
bool —Returns true if the database error log is cleared successfully, false otherwise.
dberrorcount()
Retrieves the count of database error logs.
public
dberrorcount() : string
Return values
string —The count of database error logs.
dberrorinsert()
Inserts a database error log with the specified message.
public
dberrorinsert(string $message) : bool
Parameters
- $message : string
-
The error message to be logged.
Return values
bool —True if the insertion is successful, false otherwise.
generatelogsaccordion()
public
generatelogsaccordion(string $type, array<string|int, mixed> $l) : string
Parameters
- $type : string
- $l : array<string|int, mixed>
Return values
stringmailall()
Retrieves mail logs based on the specified page.
public
mailall([string $pg = '1' ]) : array<string|int, mixed>|false
Parameters
- $pg : string = '1'
-
The page number. Defaults to '1'.
Return values
array<string|int, mixed>|false —An array of mail logs if successful, false otherwise.
mailclear()
Clears the mail log.
public
mailclear() : bool
Return values
bool —True if the mail log is cleared successfully, false otherwise.
mailcount()
Retrieves the count of mail logs.
public
mailcount() : string
Return values
string —The count of mail logs.
mailinsert()
Inserts a new mail log entry.
public
mailinsert(string $mailid, string $message[, string $debugphp = '' ]) : bool
Parameters
- $mailid : string
-
The ID of the mail log entry.
- $message : string
-
The message of the mail log entry.
- $debugphp : string = ''
-
The debug PHP information. Defaults to an empty string.
Return values
bool —Returns true if the insertion was successful, false otherwise.
mailupdate()
Updates a specific column, in a specific row of the mail log table with the specified value.
public
mailupdate(string $col, string $val, string $mailid) : bool
Parameters
- $col : string
-
The column name to update.
- $val : string
-
The value to set.
- $mailid : string
-
The mail ID of the row to update.
Return values
bool —True if the update is successful, false otherwise.
phpall()
Retrieves PHP logs based on the specified page.
public
phpall([string $pg = '1' ]) : array<string|int, mixed>|false
Parameters
- $pg : string = '1'
-
The page number. Defaults to '1'.
Return values
array<string|int, mixed>|false —An array of PHP logs if successful, false otherwise.
phpclear()
Clears all PHP logs.
public
phpclear() : bool
Return values
bool —true if the clearing operation was successful, false otherwise.
phpcount()
Returns the count of the phplog.
public
phpcount() : string
Return values
string —The count of the phplog if available, otherwise '0'.
systemall()
Retrieves all system logs.
public
systemall([string $pg = '1' ]) : array<string|int, mixed>|bool
Parameters
- $pg : string = '1'
-
The page number to retrieve logs from. Default is '1'.
Return values
array<string|int, mixed>|bool —Returns an array of system logs if available, otherwise false.
systemclear()
Clears the system log.
public
systemclear() : bool
Return values
bool —Returns true if the system log is successfully cleared, false otherwise.
systemcount()
Returns the count of the systemlog.
public
systemcount() : string
Return values
string —The count of the system if available, otherwise '0'.
systeminsert()
Inserts a system log entry with the specified message and request data.
public
systeminsert(string $message[, mixed $request = '' ]) : bool
Parameters
- $message : string
-
The message for the system log entry.
- $request : mixed = ''
-
The request data. Defaults to an empty string.
Return values
bool —True if the system log entry was successfully inserted, false otherwise.
systeminsertwparam()
Inserts a system log with additional parameters.
public
systeminsertwparam(string $message, array<string|int, mixed> $atts) : bool
Parameters
- $message : string
-
The log message.
- $atts : array<string|int, mixed>
-
The additional parameters for the log.
Return values
bool —True if the log was successfully inserted, false otherwise.
gensystemdberrorarray()
Generates an array of system database errors based on the specified page, type, and logs.
private
gensystemdberrorarray(array<string|int, mixed> $slogs, string $pg[, string $type = '0' ]) : array<string|int, mixed>
Parameters
- $slogs : array<string|int, mixed>
-
The logs array.
- $pg : string
-
The page number.
- $type : string = '0'
-
The type of logs to generate. Defaults to '0'.
Return values
array<string|int, mixed> —An array of system database errors.