ToEventlog
extends ToSyslog
in package
implements
Loggingable
Log to EventLog.
Tags
Interfaces, Classes, Traits and Enums
Table of Contents
- $capacity : int
- Number of messages to keep
- $debug : bool
- Debug mode flag.
- $flushed : array<string|int, mixed>
- List of allready flushed messages.
- $logName : string
- Log Name
- $logPrefix : string
- Adresář do kterého se zapisují logy.
- $logStyles : array<string|int, mixed>
- Hodnoty pro obarvování logu.
- $logType : string
- Předvolená metoda logování.
- $parentObject : Sand
- Odkaz na vlastnící objekt.
- $statusMessages : array<string|int, mixed>
- Messages live here
- $instance : ToEventlog|null
- Saves obejct instace (singleton...).
- $messageID : int
- ID naposledy ulozene zpravy.
- __construct() : mixed
- Logovací třída.
- __destruct() : mixed
- Close syslog connection
- __toString() : string
- Magical function for all descendants (childern).
- addToLog() : int
- Zapise zapravu do logu.
- draw() : string
- Default draw method.
- finalizeMessage() : string
- Encode For Windows event Log
- getLogStyle() : string
- Vrací styl logování.
- getObjectName() : string
- Returns object name
- output() : int
- Output logline to stderr/stdout by its type
- singleton() : ToSyslog
- Obtain instance of Syslog loger
Properties
$capacity
Number of messages to keep
public
int
$capacity
= 1024
$debug
Debug mode flag.
public
bool
$debug
= false
$flushed
List of allready flushed messages.
public
array<string|int, mixed>
$flushed
= []
$logName
Log Name
public
string
$logName
= null
$logPrefix
Adresář do kterého se zapisují logy.
public
string
$logPrefix
= null
dirpath
$logStyles
Hodnoty pro obarvování logu.
public
array<string|int, mixed>
$logStyles
= ['notice' => 'color: black;', 'success' => 'color: #2C5F23;', 'message' => 'color: #2C5F23;', 'warning' => 'color: #AB250E;', 'error' => 'color: red;', 'debug' => 'font-style: italic;', 'report' => 'font-wight: bold;', 'info' => 'color: blue;']
$logType
Předvolená metoda logování.
public
string
$logType
= 'eventlog'
$parentObject
Odkaz na vlastnící objekt.
public
Sand
$parentObject
= null
$statusMessages
Messages live here
public
static array<string|int, mixed>
$statusMessages
= []
$instance
Saves obejct instace (singleton...).
private
static ToEventlog|null
$instance
= null
Saves obejct instace (singleton...).
$messageID
ID naposledy ulozene zpravy.
private
int
$messageID
= 0
unsigned
Methods
__construct()
Logovací třída.
public
__construct([string $logName = null ]) : mixed
Parameters
- $logName : string = null
-
symbolic name for log
Return values
mixed —__destruct()
Close syslog connection
public
__destruct() : mixed
Return values
mixed —__toString()
Magical function for all descendants (childern).
public
__toString() : string
Return values
string —addToLog()
Zapise zapravu do logu.
public
addToLog(string|object $caller, string $message[, string $type = 'message' ]) : int
Parameters
- $caller : string|object
-
název volajícího objektu
- $message : string
-
zpráva
- $type : string = 'message'
-
typ zprávy (success|info|error|warning|*)
Return values
int —logged message length
draw()
Default draw method.
public
draw() : string
Return values
string —finalizeMessage()
Encode For Windows event Log
public
finalizeMessage(string $messageRaw) : string
Parameters
- $messageRaw : string
Return values
string —ready to use message
getLogStyle()
Vrací styl logování.
public
getLogStyle([string $logType = 'notice' ]) : string
Parameters
- $logType : string = 'notice'
-
typ logu warning|info|success|error|notice|*
Return values
string —getObjectName()
Returns object name
public
getObjectName() : string
Return values
string —output()
Output logline to stderr/stdout by its type
public
output(string $type, string $logLine) : int
Parameters
- $type : string
-
message type 'error' or anything else
- $logLine : string
-
message to output
Return values
int —bytes written
singleton()
Obtain instance of Syslog loger
public
static singleton() : ToSyslog