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

reduce logging noise #4713

Closed
turadg opened this issue Mar 1, 2022 · 1 comment · Fixed by #4746
Closed

reduce logging noise #4713

turadg opened this issue Mar 1, 2022 · 1 comment · Fixed by #4746
Labels
deployment Chain deployment mechanism (e.g. testnet) technical-debt tooling repo-wide infrastructure

Comments

@turadg
Copy link
Member

turadg commented Mar 1, 2022

What is the Problem Being Solved?

Bootstrap is noisy:

Console output for for a test before it starts
BLD: new Promise
RUN: new Promise
Attestation: new Promise
BLD: new Promise
RUN: new Promise
Attestation: new Promise
contractGovernor: new Promise
committee: new Promise
noActionElectorate: new Promise
binaryVoteCounter: new Promise
amm: new Promise
VaultFactory: new Promise
liquidate: new Promise
getRUN: new Promise
pegasus: new Promise
economicCommittee: new Promise
amm: new Promise
ammGovernor: new Promise
VaultFactory: new Promise
Treasury: new Promise
VaultFactoryGovernor: new Promise
liquidate: new Promise
getRUN: new Promise
getRUNGovernor: new Promise
Pegasus: new Promise
VaultFactory: new Promise
Treasury: new Promise
makeBundle @agoric/governance/src/committee.js
makeBundle @agoric/governance/src/binaryVoteCounter.js
makeBundle @agoric/governance/src/contractGovernor.js
RUN settled; remaining: [ 'Attestation', 'BLD' ]
RUN settled; remaining: [ 'Attestation', 'BLD' ]
economicCommittee settled; remaining: [
  'Pegasus',
  'Treasury',
  'VaultFactory',
  'VaultFactoryGovernor',
  'amm',
  'ammGovernor',
  'getRUN',
  'getRUNGovernor',
  'liquidate'
]
contractGovernor settled; remaining: [
  'VaultFactory',
  'amm',
  'binaryVoteCounter',
  'committee',
  'getRUN',
  'liquidate',
  'noActionElectorate',
  'pegasus'
]
committee settled; remaining: [
  'VaultFactory',
  'amm',
  'binaryVoteCounter',
  'getRUN',
  'liquidate',
  'noActionElectorate',
  'pegasus'
]
binaryVoteCounter settled; remaining: [
  'VaultFactory',
  'amm',
  'getRUN',
  'liquidate',
  'noActionElectorate',
  'pegasus'
]
amm settled; remaining: [
  'Pegasus',
  'Treasury',
  'VaultFactory',
  'VaultFactoryGovernor',
  'ammGovernor',
  'getRUN',
  'getRUNGovernor',
  'liquidate'
]
ammGovernor settled; remaining: [
  'Pegasus',
  'Treasury',
  'VaultFactory',
  'VaultFactoryGovernor',
  'getRUN',
  'getRUNGovernor',
  'liquidate'
]
amm settled; remaining: [
  'VaultFactory',
  'getRUN',
  'liquidate',
  'noActionElectorate',
  'pegasus'
]
&& task was past its deadline when scheduled: 0 &&
@@ schedule task for:1, currently: 0 @@
TEST ONLY: capturing test data [Function (anonymous)]
VaultFactory settled; remaining: [
  'Pegasus',
  'Treasury',
  'VaultFactoryGovernor',
  'getRUN',
  'getRUNGovernor',
  'liquidate'
]
Treasury settled; remaining: [
  'Pegasus',
  'VaultFactoryGovernor',
  'getRUN',
  'getRUNGovernor',
  'liquidate'
]
VaultFactoryGovernor settled; remaining: [ 'Pegasus', 'getRUN', 'getRUNGovernor', 'liquidate' ]
VaultFactory settled; remaining: [ 'getRUN', 'liquidate', 'noActionElectorate', 'pegasus' ]
liquidate settled; remaining: [ 'getRUN', 'noActionElectorate', 'pegasus' ]
&& task was past its deadline when scheduled: 0 &&
@@ schedule task for:10, currently: 0 @@

Other areas are noisy too, depending on your purposes. E.g. run-protocol logs a bunch of things that you wouldn't be interested in unless you're debugging run-protocol.

Description of the Design

We've deferred solving logging: #1318 @dckc explained to me it's complicated by #2519 and vats can't access ENV or do any IO, even in dev. Maybe there's a way to run a vat in a certain mode that configures logging.

But some options:

  • more concise output of what is logged (e.g. collapse multiline logs to one)
  • opt-out options (for logs that are valuable in production but not development)
  • opt-in options for what won't ever be useful in production and is only sometimes useful while debugging (e.g. like debug or anylogger used for agoric start output is super noisy #571)

Security Considerations

TBD

Test Plan

TBD

@turadg turadg added enhancement New feature or request deployment Chain deployment mechanism (e.g. testnet) tooling repo-wide infrastructure technical-debt and removed enhancement New feature or request labels Mar 1, 2022
@dckc
Copy link
Member

dckc commented Mar 2, 2022

this seems to help quite a bit. Bonus points to anybody who can context switch and get it in before I can...

modified   packages/vats/src/core/utils.js
@@ -215,7 +215,7 @@ harden(extractPowers);
  *
  */
 export const makeAgoricNamesAccess = (
-  log = console.debug,
+  log = () => {}, // console.debug
   reserved = agoricNamesReserved,
 ) => {
   const { nameHub: agoricNames, nameAdmin: agoricNamesAdmin } =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Chain deployment mechanism (e.g. testnet) technical-debt tooling repo-wide infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants