-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/1593 add fields to logs #1596
Conversation
@@ -343,6 +343,9 @@ int inSigHandler = 0; | |||
char* progName; /* needed for messages (and by lmLib) */ | |||
char progNameV[512]; /* where to store progName */ | |||
__thread char transactionId[64] = "N/A"; | |||
__thread char srv[50 + 1] = "N/A"; // FIXME: Maybe we should use limits.h ? | |||
__thread char subsrv[51*10 +1] = "N/A"; // FIXME: Maybe we should use limits.h ? | |||
__thread char from[4*4 + 1] = "N/A"; // Based in XXX.XXX.XXX.XXX | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
srv ... I would prefer to write out the name "service", not especially long.
And, these names are very generic and need either to be static or have a prefix.
I guess static would be enough.
About 'from', it doesn't say much. Perhaps peerIp or clientIp would be more descriptive ?
About the default value, I'd leave it as is.
I really don't want any dependencies of common-lib in logMsg (which is a lower level library).
Now, about from[4 * 4 + 1]: just put 16, 4 * 4 + 1 is not even correct ...
Or, add a definition of NUMERICAL_IP_MAX_SIZE as 15 and then use NUMERICAL_IP_MAX_SIZE + 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names of the variables came after the names that Operaions have defined for the fields of the log.
srv= ... | subsrv= ... | from= ...
I think that having the same name will help to identify the purpose of each variable.
I'll move limits to limit.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your point, however, logMsg is a generic library.
srv ... server?
In contextBroker.cpp we would have the string "srv=SERVICE", which is OK, as it is specific for the broker, but lmLib ... is not. We need to discuss this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, no problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7b4270c
@@ -304,13 +304,6 @@ extern int noOfRtUnsubscribeContextResponse; | |||
extern int noOfRtSubscribeResponse; | |||
extern int noOfRtSubscribeError; | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old leftover, spotted in this PR.
NTC
LGTM |
Ready to merge... when jenkins finishes. |
…_logs Feature/1593 add fields to logs
Implements #1593