Skip to content

Commit

Permalink
fix(eventual-send): switch DEBUG option to be comma separated
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 11, 2024
1 parent e423804 commit fea3ba0
Showing 1 changed file with 5 additions and 10 deletions.
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

0 comments on commit fea3ba0

Please sign in to comment.