format(DATE_ATOM); file_put_contents( Hybrid_Auth::$config["debug_file"], "DEBUG -- " . $_SERVER['REMOTE_ADDR'] . " -- " . $datetime . " -- " . $message . " -- " . print_r($object, true) . "\n", FILE_APPEND ); } } /** * Info * @param String $message */ public static function info( $message ) { if( in_array(Hybrid_Auth::$config["debug_mode"], array(true, 'info'), true) ){ $datetime = new DateTime(); $datetime = $datetime->format(DATE_ATOM); file_put_contents( Hybrid_Auth::$config["debug_file"], "INFO -- " . $_SERVER['REMOTE_ADDR'] . " -- " . $datetime . " -- " . $message . "\n", FILE_APPEND ); } } /** * Error * @param String $message Error message * @param Object $object */ public static function error($message, $object = NULL) { if(isset(Hybrid_Auth::$config["debug_mode"]) && in_array(Hybrid_Auth::$config["debug_mode"], array(true, 'info', 'error'), true) ){ $datetime = new DateTime(); $datetime = $datetime->format(DATE_ATOM); file_put_contents( Hybrid_Auth::$config["debug_file"], "ERROR -- " . $_SERVER['REMOTE_ADDR'] . " -- " . $datetime . " -- " . $message . " -- " . print_r($object, true) . "\n", FILE_APPEND ); } } }