Re: Log::XML - Request for Comments, preparing the package for a vote
| From: | Christian Weiske | Date: | Thu, 25 Jun 2009 06:37:49 +0000 |
| Subject: | Re: Log::XML - Request for Comments, preparing the package for a vote | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52056@lists.php.net to get a copy of this message | ||
Hi Michael,
> Before I get carried away would it be better to keep the package small or
> make it more complete? Or more concretely, I'm thinking of creating a
> separate Log_XML_XMLWriter abstract class, a Log_XML_XMLWriter_Simple
> implementation and using the external entities idea there. Should I?
I think you should provide a very reasonable default implementation that can be used without
thinking much about it. Using the same schema log4j does would be such a one.
Apart from that, do whatever you'd like to do. I personally would drop the DOM based loggers
because they are unusable in practice.
> Technically with the external entities idea I could make a Log_XML_String
> abstract class as well and just write XML formatted text instead of using
> any actual library, or should I just keep it simple?
Just write it out.
Regarding the filetoolkit: Do you really need it? Why?
- mkpath() for example can be replaced with mkdir($path, 0755, true)
- all those calls to checkCurrentOS() are unneccessary when you just would compare the os string set
in the constructor
- why do you need the realpath method? why not use the filename as you got it?
--
Regards/Mit freundlichen Grüßen
Christian Weiske