util 
[ doc home ] [ class tree: util ] [ index: util ] [ all elements ]

Class: IsterLoggerFile

Source Location: /IsterLoggerFile.php

Class Overview

IsterLogger
   |
   --IsterLoggerFile

This class represents a log writer.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Variables

Methods


Child classes:

IsterLoggerDebug
This class represents a log writer.

Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterLogger

IsterLogger::IsterLogger()
Constructor
IsterLogger::getLevelStr()
Return a string representation of the log level.
IsterLogger::log()
Print the log message.
IsterLogger::setup()
Setup the logger.

Class Details

This class represents a log writer.

You must use setupLogger() to pass a valid ressource before you can use IsterLoggerFile.

  1. $o = new IsterObject;
  2. $fh = fopen('file.log', 'a');
  3. $o->addLogger('IsterLoggerFile');
  4. $o->setupLogger('IsterLoggerMysql',
  5. array('fh' => $filehandle,
  6. 'loglevel' => E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE));
The ressource passed via 'fh' may also be a stream, pipe or socket.


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Variables

protected ressource $fh Filehandle (stream, file, pipe, socket)
[ Top ]



Class Methods


constructor IsterLoggerFile

IsterLoggerFile IsterLoggerFile( )

Constructor

[ Top ]

method log

integer log( string $msg, integer $level, string $caller, string $context)

Write a line to the logfile.

Overridden in child classes as:

IsterLoggerDebug::log()
Write a line to the log file including ressource usage.

Overrides IsterLogger::log() (Print the log message.)

Parameters:

string   $msg  
integer   $level  
string   $caller  
string   $context  

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:20:55 +0100 by phpDocumentor 1.3.0RC4