[OPEN-ILS-DEV] PATCH: log.[ch] (localizing various things)
Scott McKellar
mck9 at swbell.net
Tue Jun 19 22:58:11 EDT 2007
--- Mike Rylander <mrylander at gmail.com> wrote:
> I've attached a slight reworking of your patch for general
> consumption. Comments below.
>
> Thanks, Scott
>
> --miker
Sorry but I'm a little confused now.
Did you apply the modified patch? The code in the Subversion
repository doesn't show any changes, so far as I can tell. Maybe
I'm not looking in the right place? What do I do now?
I don't know what the customary practice is for a partially accepted
patch. I expected that you would apply the patch with whatever
modifications you like. Then I could download the fresh source
files, as patched, and work from those. However I can work with any
reasonable procedure, as long as I know what it is.
Also: I can understand wanting to keep the macros for logging
levels in the header. But what about OSRF_LOG_GO? That's not a
logging level, it's a function-like macro that wraps the
_osrfLogDetail function. If the latter is moved out of the header
and declared static, then OSRF_LOG_GO will not be usable outside
of log.c.
Scott McKellar
http://home.swbell.net/mck9/aargh/
>
> On 6/17/07, Scott McKellar <mck9 at swbell.net> wrote:
> > This patch tidies up log.h and log.c a bit, mostly by moving
> various
> > things from the former to the latter. In all cases I verified that
> > no other source code referenced the things changed, apart from a
> > few spurious matches in some python modules.
> >
> > 1. Whenever a declared identifier had two leading underscores, I
> > removed the first one, except for a few cases where I removed the
> > second one and kept the first one.
> >
> > 2. I moved the following macros to log.c:
> >
> > OSRF_LOG_ERROR
> > OSRF_LOG_WARNING
> > OSRF_LOG_INFO
> > OSRF_LOG_DEBUG
> > OSRF_LOG_INTERNAL
> > OSRF_LOG_ACTIVITY
> > OSRF_LOG_GO
>
> For the time being I'm going to leave these defined in the header,
> along with the osrfLogSetLevel() function, as I can certainly see the
> need, during development of an application, to change the logging
> level for a short section of code. To support that, I'm going to add
> a osrfLogGetLevel() function to retrieve the current level for later
> resetting.
<snip>
More information about the Open-ils-dev
mailing list