I know this thread is old... But for people that are looking for some 
simple logging by level functionality I have added basic logging levels to 
the default Go log package.  You can find my changes here:

https://github.com/gologme/log

In addition to adding Info, Warn, and Debug, users can also define their 
own arbitrary logging levels.  Also, logging levels are enabled or disabled 
individually.   So you can enable just Debug logs without getting Info and 
Warn.  The enabling only impacts the new added logging levels, not the 
traditional Print and Fatal loggers. 

All of the original functionality still exists and is unchanged. Though, I 
did enable the ability for users to define the calldepth. 



On Thursday, August 17, 2017 at 1:03:14 PM UTC-6, Henrik Johansson wrote:
>
> Thx Chris, that's unfortunate it was many years until the Java world 
> settled on something that worked in spite of having a built-in  log 
> package. 
>
> This is truly an area where we seem to repeat the mistakes of the past. 
>
> On Thu, 17 Aug 2017, 18:11 Chris Hines <[email protected] <javascript:>> 
> wrote:
>
>> On Thursday, August 17, 2017 at 3:14:09 AM UTC-4, Henrik Johansson wrote:
>>>
>>> Sorry to but in but what happened to the whole logging initiative that 
>>> was on going?
>>> Did I miss something about that? It seems very related to this.
>>>
>>
>> That discussion took place in this thread: 
>> https://groups.google.com/forum/#!topic/golang-dev/F3l9Iz1JX4g
>>
>> Some proposals were drafted (links to them are in the above thread). 
>> Proposal authors also had two conference calls to discuss and share ideas 
>> and opinions. Notes from those meetings were recorded in these two 
>> documents:
>>
>>
>> https://docs.google.com/document/d/1hovWbs19GvzfYDd-2RSYw4GN3h4vkbPUj_qO5cZa1uU/edit?usp=sharing
>>
>> https://docs.google.com/document/d/1IOaEPwmVZrvlCg5anWI0UC9yaZmihSiMvu6-471f8KY/edit?usp=sharing
>>
>> I don't know if the last two links will work for everyone because of 
>> permissions on the docs. I don't own the docs, so I cannot change the 
>> permissions. I will try to get the owner to open the permissions for 
>> viewing.
>>
>> The general consensus (as I perceived it) was that logging use cases are 
>> too diverse to make a standard interface that satisfies a wide enough 
>> range. The group felt that persuading the community to treat logging as an 
>> application concern and that libraries should return errors or provide 
>> hooks rather than log directly. The last several slides of my talk (linked 
>> to earlier in the thread) was my attempt to persuade/educate along those 
>> lines.
>>
>> Chris
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to