Skip to content
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

A lot of noisy message: Updated the logging layer according to log_config.json` #272

Closed
mrLSD opened this issue May 5, 2023 · 12 comments
Closed
Assignees

Comments

@mrLSD
Copy link

mrLSD commented May 5, 2023

It is a lot of noisy log messages in the output:

Updated the logging layer according to `log_config.json`

Link to GitHub CI:
https://github.com/aurora-is-near/aurora-workspace/actions/runs/4893433957/jobs/8736389991#step:5:473

no-capture flag is not enabled.

Tested in 3 completely different projects. Same log message is in the output.

@itegulov
Copy link
Contributor

Seems like this is happening because of near/nearcore#8810. Not sure if there is a good way to silence this other than just not inheriting stdout from sandbox. @ChaoticTempest thoughts?

@ChaoticTempest
Copy link
Member

yeah looks like we're just inheriting stdout by default for sandbox processes. A couple options we have for silencing it:

  • set the sandbox proccess stdout to Stdio::null which just directs it to /dev/null, but nearcore might have informative stdout/stderr related info if it crashes or something can be added in the future, so probably not the best option.
  • Since we have sandbox/network-builders now, we can have an extra parameter there saying whether or not to include stdout, with the default being not to include

@itsyaasir
Copy link
Contributor

itsyaasir commented Jul 5, 2023

👋🏾 As per our discussion with @frol , I would like to take up this issue. Thanks

@frol
Copy link
Collaborator

frol commented Jul 5, 2023

Another option I would consider - fix it on nearcore side - avoid using println (use logging instead)

@itsyaasir
Copy link
Contributor

Another option I would consider - fix it on nearcore side - avoid using println (use logging instead)

Yeah, I think I will look into this.

@itsyaasir
Copy link
Contributor

I have confirmed that the messages are no longer printed in the stdout. Attached is a screenshot with two commands.

  • The first command is running with custom sandbox built against this branch, as you can see there's no println messages
  • The second command is using the default sandbox and the print messages are there

PS:- The default version uses Commit hash for the sandbox "versioning", we will have to update the hash if we want to use the new sandbox which doesn't have the logging messages.

Screenshot 2023-07-07 at 9 08 57 AM

@mrLSD
Copy link
Author

mrLSD commented Jul 7, 2023

@itsyaasir is there a way to test it with workspaces-rs? Maybe git hash?

P.F. Out of discussion: what's the cool plugin for zsh? ))

@itsyaasir
Copy link
Contributor

itsyaasir commented Jul 7, 2023

@itsyaasir is there a way to test it with workspaces-rs? Maybe git hash?

P.F. Out of discussion: what's the cool plugin for zsh? ))

Unfortunately I don't have git hash, I can provide the sandbox that I used which I built it based on this PR. To get this changes in the workspace-rs, we need the PR merged and update the near-sandbox-utils to use the newer sandbox (from what I have seen). Correct me if am wrong

PS: It's not zsh plugin, I am using starship-rs shell which has this nice simple preset and some customized icons.

@itsyaasir
Copy link
Contributor

itsyaasir commented Jul 18, 2023

This issue can be closed, altho we will need to update the sandbox utils crate to use the latest near sandbox.

@frol
Copy link
Collaborator

frol commented Jul 30, 2023

Resolved in near/nearcore#9277

@frol frol closed this as completed Jul 30, 2023
@mrLSD
Copy link
Author

mrLSD commented Aug 31, 2023

The issue is still online. NEAR Issue was resolved, but we're still have same issue using workspace-rs. Any advice, please?
@frol @itsyaasir

@ghost
Copy link

ghost commented Aug 31, 2023

@mrLSD The main reason it is showing now is because workspace-rs is using an older sandbox, this PR should get rid of the logging texts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants