On May 6, 2013, at 9:11 AM, Norbert Hartl <norb...@hartl.name> wrote:

> 
> Am 06.05.2013 um 08:00 schrieb Denis Kudriashov <dionisi...@gmail.com>:
> 
>> Hello.
>> 
>> What about logging levels?
>> 
>> I like "logInfo:", "logDebug:", "logTrace:". Or maybe it is better to split 
>> log with levels: "self log info:", "self log debug:", "self log trace:"
>> 
> I think that opens a can of worms. What Stef wants is a "say something" 
> method that is easy to use and commonly useful. Adding logging levels is a 
> specialized form of logging that is not commonly useful, it's just commonly 
> used in less reflective environments. 
> So my proposal would be to have an equivalent to "self log" where you can 
> return your own logging facility on which you can do "self log info: 
> 'something'". 
> 
> I changed my kind of logging some time ago. I just log objects. A log object 
> isn't much more than to put it on top of a collection. While I'm not using 
> strings for logging I have objects where I can attach all my use case 
> dependent stuff. You could even put something like a log level information in 
> those objects. 
> I log Errors as well as progress state objects,etc. It is easy to process the 
> whole log collection (now or afterwards) because all necessary state is still 
> there. 

Yes!!!

> Another reason why I don't like strings for that is that I put the log 
> messages as json in elasticsearch/mongo because I want to query them to find 
> errornous behaviour. Well, sometimes I do both: Store it in a database and 
> write it to disk. Because I don't convert it to a string at first possible 
> time I can do that easily. 
> 
> We don't put sources in files so we shouldn't put log information only there. 
> Make logging information a first class citizen!


Yes this is what I'm doing right now. 
So back to coding…..
> 
> Norbert
> 
>> Best regards,
>> Denis
>> 
>> 2013/5/5 Stéphane Ducasse <stephane.duca...@inria.fr>
>> Hi guys
>> 
>> Stupidly I introduced log: a while ago to replace Transcript show:. Now is 
>> the current situation.
>> 
>> I still want to remove all the use of Transcript show:
>> 
>> Now since I thought I did a mistake with log: because it overload 
>> Integer>>log: I introduced trace: and traceCr:
>> 
>> Now I do not like traceCr: because it is not a cool message.
>> 
>> So what do we do:
>> 
>>         1) we use crLog:, logCr:
>>         and deprecated log:
>> 
>> 
>>         2) we use crTrace:, trace: and traceCr:
>> 
>> I really prefer solution 1 but I would like to hear from you.
>> 
>> Stef
>> 
> 

Reply via email to