|
-
August 10th, 2010, 11:59 AM
#16
Re: Ways to insert unique ID into a logging function
 Originally Posted by ahmd
And, Arjay, I'm still not sure what you're talking about...
Think back to previous posts and what your comments were to other folks that posted code in an effort to help you. I can think of two recent examples involving Igor and myself and those are only recent ones. Think about it.
-
August 10th, 2010, 12:04 PM
#17
Re: Ways to insert unique ID into a logging function
What? Arjay, you didn't drink anything this morning, did you
-
August 10th, 2010, 02:57 PM
#18
-
August 10th, 2010, 04:05 PM
#19
Re: Ways to insert unique ID into a logging function

Hey, I remember I ran into a thread here with pictures of some of this forum's mvps. Is it still somewhere?
-
August 10th, 2010, 04:15 PM
#20
-
August 10th, 2010, 04:30 PM
#21
Re: Ways to insert unique ID into a logging function
 Originally Posted by ahmd
Igor, first of all, you contradict yourself. You say that I should keep my logging to a bare minimum because of the log size concerns and then tell me to include "human readable text in every log record along with printing pairs (critical variable = value) inside the text".
First of all I said you should not log in spartan/laconic style, but your logs must be human readable. And keeping your logging of moderate size was only a secondary comment. So, as for me, no contradiction at all. 
And I can see that having your logs readable enough without referring to sources makes not much sense to you. The same to levels (and subsystems, though it's not that common in practice like levels). Something makes me believe it's only a matter of time. 
It is also much easier to find the code lines in the source code by their ID rather then by a discriptive text.
You must be kidding. Is that so difficult to find a descriptive text, when you know the exact function name including class name? Remember I said primary id is __FUNCTION__ but not descriptive text?
The exact log text entry might also get distorted when passed from one person to another.
The log text must not be passed from one person to another. The log files must be instead. 
One more reason is that it's always easy to refer to a particular bug by its ID number among the members of our development team.
This sounds not very convincing to me: "you know, the client reported 587 tonight. Again!" Sorry, I don't believe you, my people never talk like that. 
For your information, we use referring to a bug (inside developers team as well as between development and validation departments) not by it's placement in the source code but by its id in bug tracking system. And always it is accompanied with verbal comments about visible effects and workflow details. Very few people I know are really good at distinguishing big numbers just by hearing them.
And a bug typically appears a complex of (cross)effects caused by various combinations of reasons, and almost never it is a syntax error (or anything else same stupid) in a single line. I wish I had such bugs all the time! 
I did use __LINE__ and __FUNCTION__ in my logging before, but sometimes it gives out too much information about the code.
It's never too late to change your mind. Let's have a deal: you use your spartan id system say for a year or a half, and then share with us your impressions and improvements. Agree?
Last edited by Igor Vartanov; August 10th, 2010 at 04:34 PM.
Best regards,
Igor
-
August 10th, 2010, 04:31 PM
#22
Re: Ways to insert unique ID into a logging function
IDK, it's just nice to add a face to words ... I see you already did that, Victor 
Anyway, if someone knows the link, please post it here...
So, did you guys all meet at that Global MVP summit? Where was it, btw?
-
August 10th, 2010, 04:36 PM
#23
Re: Ways to insert unique ID into a logging function
 Originally Posted by Igor Vartanov
It's never too late to change your mind. Let's have a deal: you use your spartan id system say for a year or a half, and then share with us your impressions and improvements. Agree? 
Sure.
Well, we clearly have some different approaches to logging. I've been doing this for quite a long time and never had problems with it (nor the people that work with me.)
-
August 10th, 2010, 04:46 PM
#24
Re: Ways to insert unique ID into a logging function
I've been doing this for quite a long time and never had problems with it
Sorry, my impression was the idea is something new to you. My bad.
Best regards,
Igor
-
August 10th, 2010, 05:08 PM
#25
Re: Ways to insert unique ID into a logging function
 Originally Posted by Igor Vartanov
Sorry, my impression was the idea is something new to you. My bad. 
In case I came off wrong in my previous posts, here's an example of a log that may be generated by my software:
10193> 8/10/2010 2:55:11 PM : [0087] = >Initiating a new <name> process: Elevated. Cmd line: /ptr /log=1
10193> 8/10/2010 2:55:11 PM : [0095] = >[OS: Microsoft Windows XP Professional Service Pack 3 (build 2600). LOCALE: English_United States.1252]
10193> 8/10/2010 2:54:57 PM : [0560] = **OS_ERR: (2) "C:/Blah-blah-blah" The system cannot find the file specified.
10193> 8/10/2010 2:54:57 PM : [0567] = **INT_ERR
10193> 8/10/2010 2:54:58 PM : [0176] = Exiting process now, ret code = -24
In the sample above, 10193 is a version of the program. Then date & time when the event was logged (unless it's the Windows own Event Log), then our unique ID in the square brackets, followed by a description, where possible. In case of the OS error, it is reported too (line 3), or in case of a code/logic specific error, it's reported relative to the unique ID (line 4)
-
August 10th, 2010, 05:34 PM
#26
Re: Ways to insert unique ID into a logging function
 Originally Posted by ahmd
Hey, I remember I ran into a thread here with pictures of some of this forum's mvps. Is it still somewhere?
Looks like you are talking about the photo album thread in the Chit Chat section. The link, BTW, wouln't even really be necessary: The thread is sticky and thus always on top pf the list.
-
August 10th, 2010, 05:50 PM
#27
Re: Ways to insert unique ID into a logging function
Nice, dude! 155 pages It may take the whole day to go through.....
-
August 10th, 2010, 05:53 PM
#28
Re: Ways to insert unique ID into a logging function
 Originally Posted by ahmd
Nice, dude! 155 pages  It may take the whole day to go through.....
If you're only looking for Arjay: There's an index in the first posts, or you could use the forum search feature.
-
August 10th, 2010, 05:59 PM
#29
Re: Ways to insert unique ID into a logging function
-
August 11th, 2010, 01:10 AM
#30
Re: Ways to insert unique ID into a logging function
 Originally Posted by ahmd
PS. Cool, so it was in Seattle... it's like an hour away from me.
And where are you (if it's not a top secret)?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|