Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Fix a logging related bug #3705

Merged
merged 3 commits into from
Jun 3, 2021
Merged

Conversation

liuzhe-lz
Copy link
Contributor

There is a bug in AML caused by trying to json stringify a circular object for logging.
Now the logging system automatically uses util.inspect() to print objects. So it's better to avoid JSON.stringify() for logging in case a circular object crashes the whole process and eats the message.
This PR also adds tag (class name) to most logging info.

@liuzhe-lz liuzhe-lz requested a review from ultmaster June 1, 2021 03:25
@ultmaster ultmaster requested a review from SparkSnail June 2, 2021 06:17
@@ -71,7 +71,7 @@ class NNIDataStore implements DataStore {

public storeTrialJobEvent(
event: TrialJobEvent, trialJobId: string, hyperParameter?: string, jobDetail?: TrialJobDetail): Promise<void> {
//this.log.debug(`storeTrialJobEvent: event: ${event}, data: ${hyperParameter}, jobDetail: ${JSON.stringify(jobDetail)}`);
//this.log.debug(`storeTrialJobEvent: event: ${event}, data: ${hyperParameter}, jobDetail:`, jobDetail);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this log info is not used, could delete this line.

@liuzhe-lz liuzhe-lz merged commit 521f191 into microsoft:master Jun 3, 2021
@liuzhe-lz liuzhe-lz deleted the log-circular branch June 3, 2021 04:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants