Documentation

DBG_Log
in package

Tags
copyright

Cloudrexx AG

author

Thomas Wirz thomas.wirz@cloudrexx.com

subpackage

lib_dbg

Table of Contents

Constants

STACK_CNT_LIMIT  = 1000
Limit of instances that can have a stack trace

Properties

$logHash  : string
DBG hash to logically associate the log instance with a request
$logPrefix  : string
Prefix to logically associate the log instance with a Cx instance
$msg  : string
The actual log message
$profiling  : int
Set DBG profiling flags on log
$stack  : array<string|int, mixed>
Call stack of log
$stackCnt  : int
Internal counter of instances having a stack trace set
$time  : float
Timestamp of log with microseconds
$type  : int
Set DBG flags on log

Methods

__construct()  : mixed
getLogHash()  : string
Get the associated request hash of the log
getLogPrefix()  : string
Get the associated prefix of the log
getMsg()  : string
Get the log message
getProfiling()  : int
Get the profiling flag mask
getStack()  : array<string|int, mixed>
Get the stack trace of the log
getTime()  : float
Get the time of the log
getType()  : int
Get the log verbosity flag mask
setTime()  : void
Set the time of the log

Constants

STACK_CNT_LIMIT

Limit of instances that can have a stack trace

protected int STACK_CNT_LIMIT = 1000

This is used to prevent a memory overflow in case of a log-leak.

Properties

$logHash

DBG hash to logically associate the log instance with a request

protected string $logHash = ''

$logPrefix

Prefix to logically associate the log instance with a Cx instance

protected string $logPrefix = ''

$msg

The actual log message

protected string $msg

$profiling

Set DBG profiling flags on log

protected int $profiling

$stack

Call stack of log

protected array<string|int, mixed> $stack = []

$stackCnt

Internal counter of instances having a stack trace set

protected static int $stackCnt = 0

$time

Timestamp of log with microseconds

protected float $time

$type

Set DBG flags on log

protected int $type

Methods

__construct()

public __construct(string $msg, int $type[, string $hash = '' ][, string $prefix = '' ]) : mixed
Parameters
$msg : string

The log message

$type : int

The log flags

$hash : string = ''
$prefix : string = ''

getLogHash()

Get the associated request hash of the log

public getLogHash() : string
Return values
string

The request hash of log time

getLogPrefix()

Get the associated prefix of the log

public getLogPrefix() : string
Return values
string

The prefix of log time

getMsg()

Get the log message

public getMsg() : string
Return values
string

The log message

getProfiling()

Get the profiling flag mask

public getProfiling() : int
Return values
int

The set profiling flag mask

getStack()

Get the stack trace of the log

public getStack() : array<string|int, mixed>
Return values
array<string|int, mixed>

The stack trace of the log. The stack is limited to 10 stack frames.

getTime()

Get the time of the log

public getTime() : float
Return values
float

The log time

getType()

Get the log verbosity flag mask

public getType() : int
Return values
int

The set log verbosity flag mask

setTime()

Set the time of the log

public setTime(float $time) : void
Parameters
$time : float

Set the time of the log


        
On this page

Search results