<?php

namespace WPML\PHP\Logger;

class DebugFileLogger extends \Psr\Log\AbstractLogger {


  public function log( $level, $message, array $context = array() ) {
    if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
      return;
    }

    $log = date( 'Y-m-d H:i:s' ) . ' [' . $level . '] ' . $message . PHP_EOL;
    \error_log( $log );
  }


}
