Overview

Namespaces

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

Classes

  • ArrayIterator
  • DateInterval
  • DOMNode
  • Kotchasan
  • Kotchasan\Accordion
  • Kotchasan\ApiController
  • Kotchasan\ArrayTool
  • Kotchasan\Cache\ApcCache
  • Kotchasan\Cache\Cache
  • Kotchasan\Cache\CacheItem
  • Kotchasan\Cache\FileCache
  • Kotchasan\CKEditor
  • Kotchasan\Collection
  • Kotchasan\Config
  • Kotchasan\Controller
  • Kotchasan\Country
  • Kotchasan\Csv
  • Kotchasan\Curl
  • Kotchasan\Currency
  • Kotchasan\Database
  • Kotchasan\Database\Db
  • Kotchasan\Database\DbCache
  • Kotchasan\Database\Driver
  • Kotchasan\Database\PdoMysqlDriver
  • Kotchasan\Database\Query
  • Kotchasan\Database\QueryBuilder
  • Kotchasan\Database\Schema
  • Kotchasan\Database\Sql
  • Kotchasan\DataTable
  • Kotchasan\Date
  • Kotchasan\DOMNode
  • Kotchasan\DOMParser
  • Kotchasan\Email
  • Kotchasan\File
  • Kotchasan\Files
  • Kotchasan\Form
  • Kotchasan\Grid
  • Kotchasan\Html
  • Kotchasan\Htmldoc
  • Kotchasan\HtmlTable
  • Kotchasan\Http\AbstractMessage
  • Kotchasan\Http\AbstractRequest
  • Kotchasan\Http\Message
  • Kotchasan\Http\NotFound
  • Kotchasan\Http\Request
  • Kotchasan\Http\Response
  • Kotchasan\Http\Stream
  • Kotchasan\Http\UploadedFile
  • Kotchasan\Http\Uri
  • Kotchasan\Image
  • Kotchasan\InputItem
  • Kotchasan\Inputs
  • Kotchasan\KBase
  • Kotchasan\Language
  • Kotchasan\ListItem
  • Kotchasan\Log\AbstractLogger
  • Kotchasan\Log\Logger
  • Kotchasan\Login
  • Kotchasan\Menu
  • Kotchasan\Mime
  • Kotchasan\Model
  • Kotchasan\Number
  • Kotchasan\ObjectTool
  • Kotchasan\Orm\Field
  • Kotchasan\Orm\Recordset
  • Kotchasan\Password
  • Kotchasan\Pdf
  • Kotchasan\Province
  • Kotchasan\Router
  • Kotchasan\Session
  • Kotchasan\Singleton
  • Kotchasan\Tab
  • Kotchasan\TableRow
  • Kotchasan\Template
  • Kotchasan\Text
  • Kotchasan\Validator
  • Kotchasan\View
  • PHPMailer
  • Psr\Log\AbstractLogger
  • Psr\Log\LogLevel
  • Psr\Log\NullLogger
  • SMTP

Interfaces

  • ArrayAccess
  • Countable
  • DateTimeInterface
  • Iterator
  • IteratorAggregate
  • Psr\Cache\CacheItemInterface
  • Psr\Cache\CacheItemPoolInterface
  • Psr\Http\Message\MessageInterface
  • Psr\Http\Message\RequestInterface
  • Psr\Http\Message\ResponseInterface
  • Psr\Http\Message\ServerRequestInterface
  • Psr\Http\Message\StreamInterface
  • Psr\Http\Message\UploadedFileInterface
  • Psr\Http\Message\UriInterface
  • Psr\Log\LoggerAwareInterface
  • Psr\Log\LoggerInterface
  • SeekableIterator
  • Serializable
  • Traversable

Traits

  • Psr\Log\LoggerTrait

Exceptions

  • Exception
  • InvalidArgumentException
  • Kotchasan\ApiException
  • Kotchasan\Cache\Exception
  • Kotchasan\Database\Exception
  • Kotchasan\InputItemException
  • LogicException
  • phpmailerException
  • RuntimeException

Functions

  • createClass
  • debug
  • getClassPath
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Psr\Log;
  4: 
  5: /**
  6:  * This is a simple Logger trait that classes unable to extend AbstractLogger
  7:  * (because they extend another class, etc) can include.
  8:  *
  9:  * It simply delegates all log-level-specific methods to the `log` method to
 10:  * reduce boilerplate code that a simple Logger that does the same thing with
 11:  * messages regardless of the error level has to implement.
 12:  */
 13: trait LoggerTrait
 14: {
 15:     /**
 16:      * System is unusable.
 17:      *
 18:      * @param string $message
 19:      * @param array  $context
 20:      */
 21:     public function emergency($message, array $context = array())
 22:     {
 23:         $this->log(LogLevel::EMERGENCY, $message, $context);
 24:     }
 25: 
 26:     /**
 27:      * Action must be taken immediately.
 28:      *
 29:      * Example: Entire website down, database unavailable, etc. This should
 30:      * trigger the SMS alerts and wake you up.
 31:      *
 32:      * @param string $message
 33:      * @param array  $context
 34:      */
 35:     public function alert($message, array $context = array())
 36:     {
 37:         $this->log(LogLevel::ALERT, $message, $context);
 38:     }
 39: 
 40:     /**
 41:      * Critical conditions.
 42:      *
 43:      * Example: Application component unavailable, unexpected exception.
 44:      *
 45:      * @param string $message
 46:      * @param array  $context
 47:      */
 48:     public function critical($message, array $context = array())
 49:     {
 50:         $this->log(LogLevel::CRITICAL, $message, $context);
 51:     }
 52: 
 53:     /**
 54:      * Runtime errors that do not require immediate action but should typically
 55:      * be logged and monitored.
 56:      *
 57:      * @param string $message
 58:      * @param array  $context
 59:      */
 60:     public function error($message, array $context = array())
 61:     {
 62:         $this->log(LogLevel::ERROR, $message, $context);
 63:     }
 64: 
 65:     /**
 66:      * Exceptional occurrences that are not errors.
 67:      *
 68:      * Example: Use of deprecated APIs, poor use of an API, undesirable things
 69:      * that are not necessarily wrong.
 70:      *
 71:      * @param string $message
 72:      * @param array  $context
 73:      */
 74:     public function warning($message, array $context = array())
 75:     {
 76:         $this->log(LogLevel::WARNING, $message, $context);
 77:     }
 78: 
 79:     /**
 80:      * Normal but significant events.
 81:      *
 82:      * @param string $message
 83:      * @param array  $context
 84:      */
 85:     public function notice($message, array $context = array())
 86:     {
 87:         $this->log(LogLevel::NOTICE, $message, $context);
 88:     }
 89: 
 90:     /**
 91:      * Interesting events.
 92:      *
 93:      * Example: User logs in, SQL logs.
 94:      *
 95:      * @param string $message
 96:      * @param array  $context
 97:      */
 98:     public function info($message, array $context = array())
 99:     {
100:         $this->log(LogLevel::INFO, $message, $context);
101:     }
102: 
103:     /**
104:      * Detailed debug information.
105:      *
106:      * @param string $message
107:      * @param array  $context
108:      */
109:     public function debug($message, array $context = array())
110:     {
111:         $this->log(LogLevel::DEBUG, $message, $context);
112:     }
113: 
114:     /**
115:      * Logs with an arbitrary level.
116:      *
117:      * @param mixed  $level
118:      * @param string $message
119:      * @param array  $context
120:      */
121:     abstract public function log($level, $message, array $context = array());
122: }
123: 
Kotchasan API documentation generated by ApiGen