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

fix(eventual-send): switch DEBUG option to be comma separated #1922

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions packages/eventual-send/src/track-turns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* global globalThis */
import { getEnvironmentOption } from '@endo/env-options';
import {
getEnvironmentOption,
environmentOptionsListHas,
} from '@endo/env-options';

// NOTE: We can't import these because they're not in scope before lockdown.
// import { assert, details as X, Fail } from '@agoric/assert';
Expand All @@ -15,16 +18,8 @@ let hiddenPriorError;
let hiddenCurrentTurn = 0;
let hiddenCurrentEvent = 0;

const DEBUG = getEnvironmentOption('DEBUG', '');

// Turn on if you seem to be losing error logging at the top of the event loop
//
// TODO This use of colon (`':'`) as a separator is a bad legacy convention.
// It should be comma (`','`). Once we can switch it to comma, then use the
// following commented out definition of `VERBOSE` instead.
// const VERBOSE = environmentOptionsListHas('DEBUG', 'track-turns');
// See /~https://github.com/Agoric/agoric-sdk/issues/8096
const VERBOSE = DEBUG.split(':').includes('track-turns');
const VERBOSE = environmentOptionsListHas('DEBUG', 'track-turns');

// Track-turns is disabled by default and can be enabled by an environment
// option.
Expand Down
Loading