Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • Bar
  • BlueScreen
  • Debugger
  • DefaultBarPanel
  • Dumper
  • FireLogger
  • Helpers
  • Logger
  • OutputDebugger

Interfaces

  • IBarPanel
  • ILogger
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class Logger

Logger.

Tracy\Logger implements Tracy\ILogger
Namespace: Tracy
Located at Tracy/Logger.php
Methods summary
public
# __construct( string|null $directory, string|array|null $email = null, Tracy\BlueScreen $blueScreen = null )

Parameters

$directory
$email
$blueScreen
public string|null
# log( mixed $message, string $priority = Tracy\ILogger::INFO )

Logs message or exception to file and sends email notification.

Logs message or exception to file and sends email notification.

Parameters

$message
$priority
one of constant ILogger::INFO, WARNING, ERROR (sends email), EXCEPTION (sends email), CRITICAL (sends email)

Returns

string|null
logged error filename

Implementation of

Tracy\ILogger::log()
public static string
# formatMessage( mixed $message )

Parameters

$message

Returns

string
string
public static string
# formatLogLine( mixed $message, $exceptionFile = null )

Parameters

$message
$exceptionFile

Returns

string
string
public string
# getExceptionFile( Exception|Throwable $exception )

Parameters

$exception

Returns

string
string
protected string
# logException( Exception|Throwable $exception, $file = null )

Logs exception to the file if file doesn't exist.

Logs exception to the file if file doesn't exist.

Parameters

$exception
$file

Returns

string
logged error filename
protected
# sendEmail( mixed $message )

Parameters

$message
public
# defaultMailer( mixed $message, string $email )

Default mailer.

Default mailer.

Parameters

$message
$email

Internal

Constants inherited from Tracy\ILogger
CRITICAL, DEBUG, ERROR, EXCEPTION, INFO, WARNING
Properties summary
public string|null $directory

name of the directory where errors should be logged

name of the directory where errors should be logged

#
public string|array|null $email

email or emails to which send error notifications

email or emails to which send error notifications

#
public string|null $fromEmail

sender of email notifications

sender of email notifications

#
public mixed $emailSnooze

interval for sending email is 2 days

interval for sending email is 2 days

#'2 days'
public callable $mailer

handler for sending emails

handler for sending emails

#
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0