[Gluster-devel] [Gluster-users] GlusterFS and the logging framework

Justin Clift justin at gluster.org
Thu May 1 14:59:20 UTC 2014


On 01/05/2014, at 9:01 AM, Vijay Bellur wrote:
> On 05/01/2014 04:07 AM, Dan Lambright wrote:
>> Hello,
>> 
>> In a previous job, an engineer in our storage group modified our I/O stack logs in a manner similar to your proposal #1 (except he did not tell anyone, and did it for DEBUG messages as well as ERRORS and WARNINGS, over the weekend). Developers came to work Monday and found over a thousand log message strings had been buried in a new header file, and any new logs required a new message id, along with a new string entry in the header file.
>> 
>> This did render the code harder to read. The ensuing uproar closely mirrored the arguments (1) and (2) you listed. Logs are like comments. If you move them out of the source, the code is harder to follow. And you probably wan't fewer message IDs than comments.
>> 
>> The developer retracted his work. After some debate, his V2 solution resembled your "approach #2". Developers were once again free to use plain text strings directly in logs, but the notion of "classes" (message ID) was kept. We allowed multiple text strings to be used against a single class, and any new classes went in a master header file. The "debug" message ID class was a general purpose bucket and what most coders used day to day.
>> 
>> So basically, your email sounded very familiar to me and I think your proposal #2 is on the right track.
> 
> +1. Proposal #2 seems to be better IMO.


+1 Agreed. :)

+ Justin

--
Open Source and Standards @ Red Hat

twitter.com/realjustinclift




More information about the Gluster-devel mailing list