Bitrix API

Logger

Class Logger Manage errors in Log Table.

Table of Contents

Constants

MAX_SHOWING_ERRORS_ITEMS  = 5

Methods

__construct()  : mixed
Logger constructor.
addError()  : bool
Add new error in log.
addLog()  : mixed
Log is like error, but not error.
clearLog()  : bool
Delete all errors from log (for one export ID)
clearOneError()  : mixed
createLogFileContent()  : mixed
getErrorExpandScript()  : mixed
Return string with js-script for expand not critical errors
getErrorsList()  : array<string|int, mixed>|string
Return existing errors in text format for view on page

Constants

MAX_SHOWING_ERRORS_ITEMS

public mixed MAX_SHOWING_ERRORS_ITEMS = 5

Methods

__construct()

Logger constructor.

public __construct(mixed $exportId) : mixed
Parameters
$exportId : mixed
  • int, ID of export profile

addError()

Add new error in log.

public addError(mixed $errCode[, null $itemId = null ][, mixed $errParams = null ]) : bool

If error by this code already exist - match time. Use newer error, If set Item - adding in items list, if not - set only text error.

Parameters
$errCode : mixed
  • string of error code, from predetermined list
$itemId : null = null
$errParams : mixed = null
Tags
throws
ExecuteException
throws
Exception
Return values
bool

addLog()

Log is like error, but not error.

public addLog([mixed $itemId = null ][, mixed $params = null ]) : mixed

It is equal entities, but we always set ErrorCode in "log".

Parameters
$itemId : mixed = null
$params : mixed = null

clearLog()

Delete all errors from log (for one export ID)

public clearLog() : bool
Tags
throws
Exception
Return values
bool

clearOneError()

public clearOneError(mixed $errCode) : mixed
Parameters
$errCode : mixed
  • string of error code, from predetermined list
Tags
throws
ArgumentException
throws
Exception

createLogFileContent()

public static createLogFileContent(mixed $exportId) : mixed
Parameters
$exportId : mixed

getErrorExpandScript()

Return string with js-script for expand not critical errors

public getErrorExpandScript() : mixed

getErrorsList()

Return existing errors in text format for view on page

public getErrorsList([mixed $flagCritical = false ]) : array<string|int, mixed>|string
Parameters
$flagCritical : mixed = false
Return values
array<string|int, mixed>|string

        
On this page

Search results