Re: Log::XML - Request for Comments, preparing the package for a vote
| From: | Michael Gower | Date: | Thu, 25 Jun 2009 06:08:41 +0000 |
| Subject: | Re: Log::XML - Request for Comments, preparing the package for a vote | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52055@lists.php.net to get a copy of this message | ||
Hello again,
I updated the docs to not reference Log_file or have @access tags, removed
the $PROJECT_ROOT in favor of SET_INCLUDE_PATH(), reran all of the unit
tests (both dev and installed) and uploaded the new docs to the website.
Whew.
Log_XML is already close to being library agnostic, on Thursday or Friday
I'll refactor an abstract Log_XML_Dom class out and have Simple and Xtj
extend that instead (Log_XML_Dom_Simple is getting pretty long though).
That would make Log_XML completely library agnostic.
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?
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?
-Michael Gower
On Wed, Jun 24, 2009 at 9:49 PM, Christian Weiske <cweiske@cweiske.de>wrote:
> Hi Michael,
>
>
> > got my first big time coding job). One of the things I wanted to
> > support was real-time viewing of the log as it is being generated.
> That'd be a big plus.
>
> > I was looking at log4j recently and in XML mode it will have
> > the header in one file and the individual log events in another file,
> > referenced via an external entities tag. Do you think this would be
> > the best way to go?
> Log4j is the defacto standard for logging with java, and there have
> many thoughts been put into its development. It's safe to follow that
> route :)
>
> > As far as XML libraries I'll look at XMLWritier and see if I could
> > factor out all library calls so that the library could be easily
> > changed to any arbitrary library.
> You cannot factor out everything - that does not work. What would work
> is making the base log class agnostic to any api by defining your own,
> and make a base plugin class that implements it for xmlwriter or dom.
>
>
> > So to summarize thank you for the good points. What do you think of
> > keeping the header and log statements in separate files and linking
> > them with an XML external entities reference? Lastly what do you
> > think of factoring out XML library calls?
> +1 :)
>
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -= Geeking around in the name of science since 1982 =-
>