Hey folks, For the past couple of days I took the liberty of partially implementing a logging module for D. I say partially because all the features that I want to implement are not currently implement. You should really look at the implementation more as a proof of concept even thought most of the code will be used in the final implementation.
That been said I am really interested in getting some feedback on the API. That includes high-level design (e.g. using a thread to perform logging. On that note I am planning to also have a shared memory implementation), interfaces and the documentation. When making comment be aware that the design goals of the module are: 1) Provide a logging mechanism that is easy to use in the common case. 2) The module should allow for as much configuration as possible at compile time and execution time without breaking design goal 1. 3) It should be possible to extend or replace the backend without breaking the semantic exposed by the API. I am fairly new to the D language so any comment on how I can take advantage of D idiom or D features in the API or implementation would be greatly appreciated. My intent, and hopefully we will get there with your help, is to include this in Phobos for D2. logging.d - http://ubuntuone.com/p/rfL/ logging.html - http://ubuntuone.com/p/rfM/ Thanks, -Jose On Mon, Apr 25, 2011 at 12:03 AM, Andrei Alexandrescu <[email protected]> wrote: > On 04/24/2011 02:23 PM, Sean Cavanaugh wrote: >> >> On 4/20/2011 11:09 AM, Robert Clipsham wrote: >>> >>> Hey folks, >>> >>> I've just finished porting my web framework from D1/Tango to D2/Phobos, >>> and in the transition lost logging functionality. As I'll be writing a >>> logging library anyway, I wondered if there'd be interest in a std.log? >>> If so, is there a current logging library we would like it to be based >>> on, or should we design from scratch? >>> >>> I know there has been discussion about Google's >>> http://google-glog.googlecode.com/svn/trunk/doc/glog.html and another >>> candidate may be http://logging.apache.org/log4j/ . Do we want a >>> comprehensive logging library, or just the basics? (Possibly with some >>> method for extension if needed). >>> >> >> >> I just wanted to mention Pantheios as a C++ logging system to take look >> at as well, I didn't see it mentioned in this thread and it seems to >> have all the major requirements for frontend/backend chaining and >> whatnot that people have brought up. The code is on sourceforge to boot. > > I think Pantheios is an example of library design gone bad. It is > fascinatingly overengineered. > > Andrei > >
