I haven't had time to check out your code graeme (I will tonight), but
you may also want to check out the bob branch of svn - I've been
working on logging there for a while. What I have essentially follows
what feti had spec'd out, with a few deviations everyone thought made
sense. While I haven't pushed it back into trunk, it is *almost*
complete, and there are even unit tests for most things.
Again, feedback from everyone would be great. If there are things
about graeme's that we like, lets use them.. vice versa too.
--Bob
On 8/9/05, graeme <[EMAIL PROTECTED]> wrote:
> Agavi Logging
> As a proof of concept I have put together some code for logging. The point
> of this is to form the
> basis of discussion, it is not sufficiently robust to enter the framework
> 'as is'. However it does (I
> believe) provide sufficient functionality to be the basis of discussion.
> There is nothing particularly special about the code, I have tried to
> follow the essence of the
> framework, however it does lack proper error checking (exceptions) unit
> tests are missing, no
> proper docs and the actual logging functionality is missing – rather the
> logging just goes to the
> screen. The main reason for these deficiencies is because I wanted to focus
> on the concept and get
> feedback on that first.
> Framework classes
> The framework classes used are as follows:
> LoggerManager This singleton class will manage the logger objects
> LoggingConfigHandler This class will extract the information form the *.ini
> file.
> Logger This class is an abstract class that provides the basic logging
> functionality. It will check if it needs to respond to a log request.
> FileLogger, EmailLogger and HTMLLogger These are child classes of Logger.
> These classes will write out the log to the appropriate location NOT
> IMPLEMENTED – at the moment it will just echo out the message.
> Using the classes
> The LoggerManager object can be set up in the index.php file, meaning that
> the logging can be used
> almost immediately. It can be set up once the agavi.php file has been
> included.
> The config_handlers.ini file has been modified to include a logging.ini
> entry.
> A logging.ini file is included
> I then tested it with the following line of code in the IndexAction, of the
> Default module.
> LoggerManager::write("Error in handleError() method of
> IndexAction.class.php",HIGH);
> Conclusion
> This is essentially presented to you all for comments.
>
> graeme.
>
> _______________________________________________
> agavi-dev mailing list
> [email protected]
> http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
>
>
>
>
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev