[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Hopefully useful: macro-controlled logger
From:       Ravi Pokala <rpokala () mac ! com>
Date:       2017-12-10 18:33:10
Message-ID: 75337BDB-3701-4215-974B-98C61997E145 () mac ! com
[Download RAW message or body]


Hi Eric,

> Date: Sat, 9 Dec 2017 11:52:10 -0500
> From: Eric McCorkle <eric@metricspace.net>
> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
> Subject: Hopefully useful: macro-controlled logger
> Message-ID: <0dd5240f-6c70-425f-7e98-7946097ea3ef@metricspace.net>
> Content-Type: text/plain; charset=utf-8
> 
> Hi folks,
> 
> ...
> 
> Anyway, on a recent flight I decided to implement a macro-controlled
> logging API in earnest.
> 
> The github project can be found here: https://github.com/emc2/mcl
> 
> ...

0) The README should be a bit more informative. ;-)

1) Since we're adding SPDX tags for licenses, you should do that too. ;-)

2) Thanks for proper (Doxygen? JavaDoc?) comments! I wish more files included at \
least a file-level overview of the type of stuff in the file.

3) Since LOG_LVL_<level> are integer values and not a bitmap, couldn't they be \
converted to an enum? That would also allow for adding new levels between existing \
levels, without having to re-number everything.

4) Hrm. Although that doesn't really help the fact that you'd still have to add the \
definition of the LOG_<level> macro. Since they're all the same, it would be nice if \
they too could be generated. But that's where you get into doing multiple levels of \
the preprocessor, and things can get incomprehensible fast. :-/

5) I think LOG_SYSTEM is poor wording -- when I first read it, I assumed it meant for \
differentiating between logging via printf() or via log(); I think LOG_MODULE would \
more clearly communicate that it's for differentiating between software modules.

6) That having been said, it would be useful if there was a way to select the log \
output destination.

I hope you find that feedback useful.

-Ravi (rpokala@)


_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic