All Methods

class logger

Debug logging during a client request. So you can measure any action find bottlenecks in your code.

Source: https://github.com/axelhahn/ahlogger

USAGE:
(1) Trigger a message with add() to add a marker
(2) The render() method lists all items in a table with time since start and the delta to the last message.

public function __construct(\$sInitMessage = "Logger was initialized.")

constuctor Parameters:

  • $sInitMessagestring — init message

Return:

boolean

public function add(\$sMessage, $sLevel = "info")

add a logging message Parameters:

  • $sMessagetype — %s
  • $sLeveltype — %s

Return:

boolean

public function enableDebug(\$bEnable=true)

enable / disable debugging Parameters:

  • $bEnabletype — %s

Return:

type

public function enableDebugByIp(\$aIpArray)

enable client debugging by a given array of allowed ip addresses Parameters:

  • $aIpArrayarray — list of ip addresses in a flat array

Return:

boolean

protected function _getBar(\$iVal, $iMax)

get html code for a progressbar with divs Parameters:

  • $iValint|float — value between 0..max value
  • $iMaxint|float — max value

Return:

{string}

public function render()

render output of all logging messages

public function renderCli()

render output of all logging messages for cli output Return:

string