-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-32615 review Thor jlog logging audiences/levels #19099
HPCC-32615 review Thor jlog logging audiences/levels #19099
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32615 Jirabot Action Result: |
@ghalliday - consider this stage 1. I've opened another [stage 2] subtask : https://hpccsystems.atlassian.net/browse/HPCC-32646, to look at migrating worker progress logging to a programmer audience. |
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.
Generally looks good. A few questions about the new categories.
I think it would be a good time to go through all the legacy macro names and change them so they are explicit. Probably something to do one macro at a time
@@ -119,7 +119,7 @@ void CDiskPartHandlerBase::open() | |||
{ | |||
StringBuffer locations; | |||
IException *e = MakeActivityException(&activity, TE_FileNotFound, "No physical file part for logical file %s, found at given locations: %s (Error = %d)", activity.logicalFilename.get(), getFilePartLocations(*partDesc, locations).str(), GetLastError()); | |||
EXCLOG(e, NULL); | |||
ERRLOG(e, "CDiskPartHandlerBase::open()"); |
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.
Should really be UERRLOG - ERRLOG is deprecated from the jlog comments.
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.
Looks like you made this comment on the 1st commit, it was changed from ERRLOG to IERRLOG in the 3rd commit.
I thought programmer audience vs user is appropriate, since the exception is being fired and propagated back to the user.
@@ -2145,13 +2145,13 @@ bool CJobMaster::fireException(IException *e) | |||
{ | |||
case tea_warning: | |||
{ | |||
LOG(MCwarning, e); | |||
LOG(MCprogress, e); |
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.
We should kill MCerror, MCwarning and MCprogress, e.g use MCuserProgress - so it is clear what the target audience is.
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 will go through their uses in Thor and transition them
@@ -117,7 +117,7 @@ static bool RegisterSelf(SocketEndpoint &masterEp) | |||
{ | |||
StringBuffer slfStr; | |||
StringBuffer masterStr; | |||
LOG(MCdebugProgress, "registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); | |||
PROGLOG("registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); |
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.
Is this something that should go to the user? Should really be named UPROGLOG to make it clear..
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'm going to introduce UPROGLOG (we have same for UERRLOG vs ERRLOG already) and rename all PROGLOG's to UPROGLOG in Thor.
I think it is debatable whether many current user progress logs should be user or programmer (or perhaps a different audience). If an advanced user wants to see the engine making progress, then some lines like these are useful - but for average ECL user, very few are meaningful..
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.
It would be worth us clearly defining which messages should go to which targets.
It would also make more sense if D was used as the prefixed for debug/programmers rather than I. That would make the functions more consistent. I will take a look at what is there already.
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.
@ghalliday - please see new commits.
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 should have been clearer that some suggestions should have been for later PRs.
This is now in danger of being too large to merge. Can we split this into 2 so the first set of changes can be reviewed and merged twice.
thorlcr/master/thgraphmanager.cpp
Outdated
@@ -621,24 +621,24 @@ void CJobManager::run() | |||
{ | |||
int p = getRunningMaxPriority(qn); | |||
if (p) | |||
PROGLOG("Dynamic Min priority = %d",p); | |||
UPROGLOG("Dynamic Min priority = %d",p); |
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.
Are these UPROGLOG messages really likely to be useful to the user? I think worth looking at all of them.
thorlcr/slave/slavmain.cpp
Outdated
@@ -63,7 +63,7 @@ bool recvShutdown = false; | |||
void enableThorSlaveAsDaliClient() | |||
{ | |||
#ifdef ISDALICLIENT | |||
PROGLOG("Slave activated as a Dali client"); | |||
UPROGLOG("Slave activated as a Dali client"); |
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.
User not even likely to be able to see this - even if it was relevant.
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 knew that the existing PROGLOG (now all UPROGLOG's) would need reviewing beyond this, but as part of this PR's move away from deprecated macros to clarify how they are currently being used (the audience) I did a blanket s&r - reviewing/pruning of which UPROGLOG's we actually want to keep as user audience can come later.
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 should have been clearer that some suggestions should have been for later PRs.
This is now in danger of being too large to merge. Can we split this into 2 so the first set of changes can be reviewed and merged twice.
@ghalliday - have rolled back to the original set of changes, and create a new subtask (https://hpccsystems.atlassian.net/browse/HPCC-32727) as a placeholder for the next changes, which I'll attach the other changes to soon.
736e1a0
to
dcaec1b
Compare
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.
Looks reasonable. Do you want to squash before merging?
@@ -117,7 +117,7 @@ static bool RegisterSelf(SocketEndpoint &masterEp) | |||
{ | |||
StringBuffer slfStr; | |||
StringBuffer masterStr; | |||
LOG(MCdebugProgress, "registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); | |||
PROGLOG("registering %s - master %s",slfEp.getEndpointHostText(slfStr).str(),masterEp.getEndpointHostText(masterStr).str()); |
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.
It would be worth us clearly defining which messages should go to which targets.
It would also make more sense if D was used as the prefixed for debug/programmers rather than I. That would make the functions more consistent. I will take a look at what is there already.
Agreed. The I->D change may make sense to include in the pending 'stage2' PR. |
dcaec1b
to
5f76167
Compare
@ghalliday - squashed |
@ghalliday - this is approved, but I notice now it needs rebasing. Will do now. |
Standarize on DBGLOG/[I]WARNLOG/[I]ERRLOG vs LOG(MCdebugProgress & LOG(MCwarning, etc. Change some PROGLOG's to better audiences (many to DBGLOG) Signed-off-by: Jake Smith <[email protected]>
5f76167
to
ebdd3a6
Compare
@ghalliday - now rebased to resolve conflict. |
Type of change:
Checklist:
Smoketest:
Testing: