[of-dev] ofxLogger

arturo castro arturo at openframeworks.cc
Sun Apr 10 02:52:01 PDT 2011


Hey Dan

i did some enhancements to your Logger before it got deleted, like the
creation of log topics by default instead of explicitly having to create
a topic before logging.

i think this is my last commit:

https://github.com/arturoc/openFrameworks/commit/725daeab669bf7299b6932f877b675a2c1484960

i agree it's too big for the core but it would be nice to have the basic
functionality. Poco Channels are great, someone was asking in the forum
some days ago about something to log for example to a gui in gl that
would be really easy with your logger.  

i would also love to have ofLogError("videoPlayer") << ....   

i always keep writting ofLog(OF_ERROR,"ofVideoPlayer:...)  which is not
only longer but is wrong cause its OF_LOG_ERROR : )

So i think it would be just a matter of getting rid of the most complex
functionality and give access to the Poco structures with methods like
getPocoLogger or setChannel or something like that, so people can do
most advanced things if they want


also the problem with the singleton could be related to this?

http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.14



El dom, 10-04-2011 a las 04:16 -0400, Dan Wilcox escribió:
> Well I could make a pull request with a lightweight stream logger that
> just uses printf internally. The file, header, and log topic features
> come from the Poco::Logger and that's the part that probably causing
> problems due to it being in a singleton.
> 
> 
> I agree that basic stream output is far faster to use then tons of
> ofToString and stringstreams ...
> 
> 
> Also, I'm sure I can add this functionality without breaking the old
> ofLog function usage.
> 
> On Apr 10, 2011, at 3:31 AM, Kyle McDonald wrote:
> 
> > not sure how other people feel about this... but i personally think
> > ofxLogger is better as an addon.
> > 
> > it would be awesome to have a few features in the core though:
> > 
> > ofLog() << "log message can print numbers: " << 40;
> > ofDrawBitmapString(10, 20) << "and ofDrawBitmapString can draw to
> > the screen";
> > 
> > the stream operators with the endl handling are awesome. if that was
> > in the core i would totally switch from cout, which is what i
> > normally
> > use while developing projects for debugging.
> > 
> > the file output option is super nice, too.
> > 
> > but i think the log rotation, header control, console coloring, and
> > hierarchical topic levels are a bit overkill for the core.
> > 
> > kyle
> > 
> > On Sun, Apr 10, 2011 at 9:20 AM, Dan Wilcox <danomatika at gmail.com>
> > wrote:
> > > Howdy all,
> > > After finally getting my local copy of OF 007 updated, I noticed
> > > the logger
> > > was removed stating that people were having problems with it. This
> > > is the
> > > first I've heard of problems and I wished I had been contacted in
> > > some way
> > > to try and resolve them. I do, however, understand removing it in
> > > the face
> > > of dealing with the host of commits, pull requests, and resulting
> > > debugging
> > > from our week long coding orgy.
> > > In any case, I've spun out the code into an
> > > addon: https://github.com/danomatika/ofxLogger It should be easier
> > > for
> > > people to test this way and later on it could be readded to the
> > > core if it
> > > makes sense.
> > > --------
> > > Dan Wilcox
> > > danomatika.com
> > > robotcowboy.com
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > of-dev mailing list
> > > of-dev at dev.openframeworks.cc
> > > http://dev.openframeworks.cc/listinfo.cgi/of-dev-openframeworks.cc
> > > 
> > > 
> 
> --------
> Dan Wilcox
> danomatika.com
> robotcowboy.com
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> of-dev mailing list
> of-dev at dev.openframeworks.cc
> http://dev.openframeworks.cc/listinfo.cgi/of-dev-openframeworks.cc





More information about the of-dev mailing list