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

feat(cosmic-swingset): make agd start stdout/stderr logs more consistent #10821

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michaelfig
Copy link
Member

Closes: #10820

Description

Standard output and error logs generated by the SwingSet VM when running agd start should be consistent with the Golang Zerolog output. The format should match the Golang logs controlled by agd start --log_format=plain or --log_format=json. Colouring the plain output with matching ANSI escapes is a non-goal.

The @agoric/telemetry package needed updating so that its components could be endowed with a properly-wrapped console object, such as that supplied by @agoric/cosmic-swingset/src/anylogger-agd.js.

Security Considerations

Providing JSON-formatted stdout log output ensures that malicious vat code cannot confuse developers or operators with raw multiline console.log text.

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

Inspection of agd start output, or consumption by a log ingestion service will demonstrate the functionality.

Upgrade Considerations

n/a

@michaelfig michaelfig added cosmic-swingset package: cosmic-swingset telemetry labels Jan 8, 2025
@michaelfig michaelfig self-assigned this Jan 8, 2025
@michaelfig michaelfig requested a review from a team as a code owner January 8, 2025 20:20
@michaelfig michaelfig force-pushed the mfig-json-console-log branch from ff30edd to 6c7761a Compare January 8, 2025 23:52
Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9af7269
Status: ✅  Deploy successful!
Preview URL: https://71d3f333.agoric-sdk.pages.dev
Branch Preview URL: https://mfig-json-console-log.agoric-sdk.pages.dev

View logs

@michaelfig michaelfig added the force:integration Force integration tests to run on PR label Jan 8, 2025
@michaelfig michaelfig force-pushed the mfig-json-console-log branch from 6c7761a to 9af7269 Compare January 9, 2025 00:54
@michaelfig michaelfig requested a review from mhofman January 12, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset force:integration Force integration tests to run on PR telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agd start standard output/error messages are not consistent
1 participant