[OPEN-ILS-DEV] PATCH: log.[ch] (localizing various things)

Scott McKellar mck9 at swbell.net
Wed Jun 20 22:10:33 EDT 2007


--- Mike Rylander <mrylander at gmail.com> wrote:

> On 6/19/07, Scott McKellar <mck9 at swbell.net> wrote:
> > --- Mike Rylander <mrylander at gmail.com> wrote:

<snip>
 
> I apologize.  I had left it for the afternoon in case you wanted to
> comment and then failed to commit in the evening.  It's in there now.

That's fine.  However there is one little oopsie -- the new
osrfLogGetLevel() needs to return int, but the function definition
declares it as void.  I could send a patch, but anybody with
commit privileges can fix it in about ninety seconds.

> In cases such as this patch, which have been few, I prefer to kick
> changes back out before unilaterally applying anything.  If you'd
> prefer I skip that step for your submissions, unless there's
> something
> very big (or it's a very big patch that I'd like wider comment on),
> that's fine.  In any case I'll be more explicit in the future.  Sorry
> for the confusion.

I'm still new at the business of source management by remote control,
so I just wasn't sure what to expect.  I don't want or expect any 
special treatment.  However I may not be able to respond quickly to
requests for comment, since this is just an evenings-and-weekends
thing for me.

Now I'll get started on the writing of log messages to stderr by
default.

In particular I plan to add another logtype, OSRF_LOG_TYPE_STDERR,
that you can request via osrfLogSetType().  Furthermore that
function, instead of returning void, will return the previous
logtype so that the calling code can restore it later.

Alternatively I could provide a separate osrfLogGetType function
to return the current logtype without changing it.  However I'm
not sure that you'd ever want to get the current logtype, except
in order to restore it after changing it, so you might as well
do it with one call instead of two.

The idea is that it might be useful, in the course of development
and debugging, temporarily to send log messages directly to stderr, 
where you can see them immediately without browsing some file several
directories away.  By switching back and forth between different
logtypes you could restrict the stderr messages to the ones you
want and not have to wade through a bunch of other clutter.

If it doesn't turn out to be useful, well, we won't have lost
anything by it.

------

Don't be alarmed if this patch takes me longer than it should.  I
mainly do this stuff on the weekends, and this coming weekend I
will be otherwise occupied most of the time.

Scott McKellar
http://home.swbell.net/mck9/aargh/



More information about the Open-ils-dev mailing list