|  | 
|  | __construct (Google_Client $client, $logger=null) | 
|  | 
|  | alert ($message, array $context=array()) | 
|  | Action must be taken immediately. 
 | 
|  | 
|  | critical ($message, array $context=array()) | 
|  | Critical conditions. 
 | 
|  | 
|  | debug ($message, array $context=array()) | 
|  | Detailed debug information. 
 | 
|  | 
|  | emergency ($message, array $context=array()) | 
|  | System is unusable. 
 | 
|  | 
|  | error ($message, array $context=array()) | 
|  | Runtime errors that do not require immediate action but should typically be logged and monitored. 
 | 
|  | 
|  | info ($message, array $context=array()) | 
|  | Interesting events. 
 | 
|  | 
|  | log ($level, $message, array $context=array()) | 
|  | {Logs with an arbitrary level. }Parameters
  
    | mixed | $level | The log level |  | string | $message | The log message |  | array | $context | The log context | 
 
 | 
|  | 
|  | notice ($message, array $context=array()) | 
|  | Normal but significant events. 
 | 
|  | 
|  | setLevel ($level) | 
|  | Sets the minimum logging level that this logger handles. 
 | 
|  | 
|  | setLogger ( $logger) | 
|  | Sets the PSR-3 logger where logging will be delegated. 
 | 
|  | 
|  | shouldHandle ($level) | 
|  | {Checks if the logger should handle messages at the provided level. Parameters
  
  
 }Return values
  
  
 
 | 
|  | 
|  | warning ($message, array $context=array()) | 
|  | Exceptional occurrences that are not errors. 
 | 
|  | 
|  | 
| const | ALERT = 'alert' | 
|  | Action must be taken immediately. 
 | 
|  | 
| const | CRITICAL = 'critical' | 
|  | Critical conditions. 
 | 
|  | 
| const | DEBUG = 'debug' | 
|  | Detailed debug information. 
 | 
|  | 
| const | DEFAULT_DATE_FORMAT = 'd/M/Y:H:i:s O' | 
|  | Default date format. 
 | 
|  | 
| const | DEFAULT_LOG_FORMAT = "[%datetime%] %level%: %message% %context%\n" | 
|  | Default log format. 
 | 
|  | 
| const | EMERGENCY = 'emergency' | 
|  | System is unusable. 
 | 
|  | 
| const | ERROR = 'error' | 
|  | Runtime errors that do not require immediate action but should typically be logged and monitored. 
 | 
|  | 
| const | INFO = 'info' | 
|  | Interesting events. 
 | 
|  | 
| const | NOTICE = 'notice' | 
|  | Normal but significant events. 
 | 
|  | 
| const | WARNING = 'warning' | 
|  | Exceptional occurrences that are not errors. 
 | 
|  | 
|  | 
|  | export ($value) | 
|  | Exports a PHP value for logging to a string. 
 | 
|  | 
|  | interpolate (array $variables=array()) | 
|  | Interpolates log variables into the defined log format. 
 | 
|  | 
|  | normalizeLevel ($level) | 
|  | Converts a given log level to the integer form. 
 | 
|  | 
|  | reverseJsonInContext (array &$context) | 
|  | Reverses JSON encoded PHP arrays and objects so that they log better. 
 | 
|  | 
|  | write ($message) | 
|  | Writes a message to the current log implementation. 
 | 
|  | 
|  | write ($message, array $context=array()) | 
|  | {} 
 | 
|  | 
|  | 
| boolean | $allowNewLines = false | 
|  | $allowNewLines If newlines are allowed 
 | 
|  | 
| string | $dateFormat = self::DEFAULT_DATE_FORMAT | 
|  | $dateFormat The current date format 
 | 
|  | 
| integer | $level = self::DEBUG | 
|  | $level The minimum logging level 
 | 
|  | 
| string | $logFormat = self::DEFAULT_LOG_FORMAT | 
|  | $logFormat The current log format 
 | 
|  | 
|  | 
| static array | $levels | 
|  | $levels Logging levels 
 | 
|  | 
◆ __construct()
      
        
          | Google_Logger_Psr::__construct | ( | Google_Client | $client, | 
        
          |  |  |  | $logger = null ) | 
      
 
- Parameters
- 
  
    | Google_Client | $client | The current Google client |  | Psr::Log::LoggerInterface | $logger | PSR-3 logger where logging will be delegated. |  
 
 
 
◆ alert()
  
  | 
        
          | Google_Logger_Abstract::alert | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Action must be taken immediately. 
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ critical()
  
  | 
        
          | Google_Logger_Abstract::critical | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Critical conditions. 
Example: Application component unavailable, unexpected exception.
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ debug()
  
  | 
        
          | Google_Logger_Abstract::debug | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Detailed debug information. 
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ emergency()
  
  | 
        
          | Google_Logger_Abstract::emergency | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
System is unusable. 
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ error()
  
  | 
        
          | Google_Logger_Abstract::error | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Runtime errors that do not require immediate action but should typically be logged and monitored. 
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ export()
  
  | 
        
          | Google_Logger_Abstract::export | ( |  | $value | ) |  |  | protectedinherited | 
 
Exports a PHP value for logging to a string. 
- Parameters
- 
  
  
 
 
◆ info()
  
  | 
        
          | Google_Logger_Abstract::info | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Interesting events. 
Example: User logs in, SQL logs.
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ interpolate()
  
  | 
        
          | Google_Logger_Abstract::interpolate | ( | array | $variables = array() | ) |  |  | protectedinherited | 
 
Interpolates log variables into the defined log format. 
- Parameters
- 
  
    | array | $variables | The log variables. |  
 
- Return values
- 
  
  
 
 
◆ log()
      
        
          | Google_Logger_Psr::log | ( |  | $level, | 
        
          |  |  |  | $message, | 
        
          |  |  | array | $context = array() ) | 
      
 
{Logs with an arbitrary level.
- Parameters
- 
  
    | mixed | $level | The log level |  | string | $message | The log message |  | array | $context | The log context |  
 
} 
Reimplemented from Google_Logger_Abstract.
 
 
◆ normalizeLevel()
  
  | 
        
          | Google_Logger_Abstract::normalizeLevel | ( |  | $level | ) |  |  | protectedinherited | 
 
Converts a given log level to the integer form. 
- Parameters
- 
  
    | mixed | $level | The logging level |  
 
- Return values
- 
  
    | integer#$level | The normalized level |  
 
- Exceptions
- 
  
  
 
 
◆ notice()
  
  | 
        
          | Google_Logger_Abstract::notice | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Normal but significant events. 
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ reverseJsonInContext()
  
  | 
        
          | Google_Logger_Abstract::reverseJsonInContext | ( | array & | $context | ) |  |  | protectedinherited | 
 
Reverses JSON encoded PHP arrays and objects so that they log better. 
- Parameters
- 
  
    | array | $context | The log context |  
 
 
 
◆ setLevel()
  
  | 
        
          | Google_Logger_Abstract::setLevel | ( |  | $level | ) |  |  | inherited | 
 
Sets the minimum logging level that this logger handles. 
- Parameters
- 
  
  
 
 
◆ setLogger()
      
        
          | Google_Logger_Psr::setLogger | ( |  | $logger | ) |  | 
      
 
Sets the PSR-3 logger where logging will be delegated. 
NOTE: The $logger should technically implement Psr::Log::LoggerInterface, but we don't explicitly require this so that we can be compatible with PHP 5.2.
- Parameters
- 
  
    | Psr::Log::LoggerInterface | $logger | The PSR-3 logger |  
 
 
 
◆ shouldHandle()
      
        
          | Google_Logger_Psr::shouldHandle | ( |  | $level | ) |  | 
      
 
{Checks if the logger should handle messages at the provided level.
- Parameters
- 
  
  
- Return values
- 
  
  
} 
Reimplemented from Google_Logger_Abstract.
 
 
◆ warning()
  
  | 
        
          | Google_Logger_Abstract::warning | ( |  | $message, |  
          |  |  | array | $context = array() ) |  | inherited | 
 
Exceptional occurrences that are not errors. 
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
- Parameters
- 
  
    | string | $message | The log message |  | array | $context | The log context |  
 
 
 
◆ write()
  
  | 
        
          | Google_Logger_Abstract::write | ( |  | $message | ) |  |  | abstractprotectedinherited | 
 
Writes a message to the current log implementation. 
- Parameters
- 
  
    | string | $message | The message |  
 
Reimplemented in Google_Logger_File.
 
 
◆ $levels
  
  | 
        
          | array Google_Logger_Abstract::$levels |  | staticprotectedinherited | 
 
Initial value:= array(
      self::EMERGENCY  => 600,
      self::ALERT => 550,
      self::CRITICAL => 500,
      self::ERROR => 400,
      self::WARNING => 300,
      self::NOTICE => 250,
      self::INFO => 200,
      self::DEBUG => 100,
  )
$levels Logging levels 
 
 
◆ ALERT
  
  | 
        
          | const Google_Logger_Abstract::ALERT = 'alert' |  | inherited | 
 
Action must be taken immediately. 
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up. 
 
 
◆ CRITICAL
  
  | 
        
          | const Google_Logger_Abstract::CRITICAL = 'critical' |  | inherited | 
 
Critical conditions. 
Example: Application component unavailable, unexpected exception. 
 
 
◆ DEFAULT_DATE_FORMAT
  
  | 
        
          | const Google_Logger_Abstract::DEFAULT_DATE_FORMAT = 'd/M/Y:H:i:s O' |  | inherited | 
 
Default date format. 
Example: 16/Nov/2014:03:26:16 -0500 
 
 
◆ INFO
  
  | 
        
          | const Google_Logger_Abstract::INFO = 'info' |  | inherited | 
 
Interesting events. 
Example: User logs in, SQL logs. 
 
 
◆ WARNING
  
  | 
        
          | const Google_Logger_Abstract::WARNING = 'warning' |  | inherited | 
 
Exceptional occurrences that are not errors. 
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong. 
 
 
The documentation for this class was generated from the following file:
- lib/google/src/Google/Logger/Psr.php