Location: PHPKode > projects > KvCMS Content Management System > kvframework/kvframework/logger/log_types/kvframework_console_logger.class.php
<?php

class kvframework_console_logger extends kvframework_logger
{
    protected $break_character;

    public function __construct(&$parent_logger_instance, $parent_application)
    {
        parent::__construct($parent_logger_instance, $parent_application);
        $this->break_character = "";
        $this->queue_mode = FALSE;
        $this->type = "console";
    }

    public function enable_queue_mode()
    { // Queue mode is not valid for this queue type
        $msg = sprintf ("Attempt to enable queueing mode for log instance of type console\n");
        $this->write_logger_log($msg);
        return (FALSE);
    }

    public function console_set_web ( )
    {
        $this->break_character = "<br>";
    }

    public function type_specific_reset()
    {
    }

    public function type_specific_open()
    {
        return ( TRUE );
    }

    public function type_specific_output_msg($entry)
    {
        // We have to pull this out because php doesn't like to use an array as an index to another array
        $severity = $entry["MSG_SEVERITY"];
        echo str_pad($entry["MSG_TIME"], 36).str_pad($entry["MSG_CATEGORY"], 13).str_pad($this->syslog_levels[$severity], 13).$entry["MSG_MSG"].$this->break_character."\n";
    }

    public function type_specific_close()
    {
    }

}
?>
Return current item: KvCMS Content Management System