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

Mike Rylander mrylander at gmail.com
Wed Jun 20 22:32:43 EDT 2007


On 6/20/07, Scott McKellar <mck9 at swbell.net> wrote:
>
> --- 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.

Good catch.  Fixed.

[snip]

> 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.
>

I guess that means we'll need to expose osrfLogSetType in the header
along with the new #defines, which is fine by me since it was that way
until the last change.

> 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.
>

I think doing it with one function is fine.  While can imagine it
being interesting to inspect the current logging level, I don't think
the same is true of the destination ... you only care about where
you're about to go, not where you've been.

[snip]

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

Right on.  TIA.

--miker


More information about the Open-ils-dev mailing list