Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • AbstractLogger
  • Logger
  • Overview
  • Namespace
  • Class
  • Tree

Class Logger

Kotchasan Logger Class (PSR-3).

Kotchasan\Log\AbstractLogger
Extended by Kotchasan\Log\Logger implements Psr\Log\LoggerInterface
Namespace: Kotchasan\Log
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/Log/Logger.php
Methods summary
public static static
# create( array $options = array() )

create Logger instance (Singleton).

create Logger instance (Singleton).

Parameters

$options

Returns

static
public
# log( mixed $level, string $message, array $context = array() )

Logs with an arbitrary level.

Logs with an arbitrary level.

Parameters

$level
$message
$context

Implementation of

Psr\Log\LoggerInterface::log()
Methods inherited from Kotchasan\Log\AbstractLogger
alert(), critical(), debug(), emergency(), error(), info(), notice(), warning()
Properties summary
protected static Singleton $instance

สำหรับเรียกใช้ class นี้เพียงครั้งเดียวเท่านั้น

สำหรับเรียกใช้ class นี้เพียงครั้งเดียวเท่านั้น

# null
protected array $logLevels

Log Levels.

Log Levels.

# array( LogLevel::EMERGENCY => 0, LogLevel::ALERT => 1, LogLevel::CRITICAL => 2, LogLevel::ERROR => 3, LogLevel::WARNING => 4, LogLevel::NOTICE => 5, LogLevel::INFO => 6, LogLevel::DEBUG => 7, )
protected array $options

รูปแบบของ log.

รูปแบบของ log.

# array( 'dateFormat' => 'Y-m-d H:i:s', 'logFormat' => '[{datetime}] {level}: {message} {context}', 'logFilePath' => 'logs/', 'extension' => 'php', )
Kotchasan API documentation generated by ApiGen