Would having logging capture the stdout/stderr?, I was assuming this would be some C functions similar to the BKE_report which we can use to replace printf's.
If so, there should be no need to mess with pythons stdout/stderr, just have a way for python to call these logging functions. On Thu, Oct 18, 2012 at 2:11 AM, Mitchell Stokes <[email protected]> wrote: > You might run into some issues with the embedded Python. I've noticed > that embedded Python doesn't always play nice with a redirected > stdout. > > --Mitchell Stokes > > On Wed, Oct 17, 2012 at 7:39 AM, Jason Wilkins > <[email protected]> wrote: >> I wasn't going to choose one particular logging library. I was going >> to create a very simple wrapper that you could plug any back-end into >> easily. Using glog is just one of those, and one reason for prompting >> this discussion is so I can see if anybody has any opinion on which >> one to target as the default. >> >> It isn't a huge project, replace half a dozen standard library >> functions and add a couple of parameters for message type and source. >> >> It is just a tedious little project that is not very sexy :) >> >> On Wed, Oct 17, 2012 at 2:06 AM, Sergey Sharybin <[email protected]> >> wrote: >>> I'm currently not so much convinced it'll indeed worth spending time on >>> this now. If you really want to look into this would suggest looking into >>> writting C wrapper for glog (C++ stuff could use glog directly). This >>> library is already heavily used in some areas, supports lots of features >>> and having another logger seems quite stupid for me. >>> >>> On Wed, Oct 17, 2012 at 6:52 AM, Alex Fraser <[email protected]> wrote: >>> >>>> On 17 October 2012 08:09, Jason Wilkins <[email protected]> wrote: >>>> > Rather than keep this on the back burner I figured I'd put this out >>>> > there for people to give some feedback. I was thinking of replacing >>>> > all direct use of the standard file handles (stdin, stderr) in Blender >>>> > with a single set of logging functions. This function could intercept >>>> > all messages and conditionally send them anywhere you wanted. In >>>> > particular I was thinking you could use one of the popular open source >>>> > logging libraries as a backend (log4cxx for example). So nobody would >>>> > need to implement a backend to send results over the network, that has >>>> > already been done. >>>> >>>> +1. I don't know what this would be like to implement in Blender, but >>>> all the projects that I've converted to use logging have since been >>>> much nicer to develop. >>>> >>>> Alex >>>> _______________________________________________ >>>> Bf-committers mailing list >>>> [email protected] >>>> http://lists.blender.org/mailman/listinfo/bf-committers >>>> >>> >>> >>> >>> -- >>> With best regards, Sergey Sharybin >>> _______________________________________________ >>> Bf-committers mailing list >>> [email protected] >>> http://lists.blender.org/mailman/listinfo/bf-committers >> _______________________________________________ >> Bf-committers mailing list >> [email protected] >> http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
