Removed phase log blacklist

This commit is contained in:
Bertie690 2025-09-21 19:50:34 -04:00
parent 55782e5dbc
commit b5b3f677c4

View File

@ -13,13 +13,6 @@ import chalk from "chalk";
import { vi } from "vitest"; import { vi } from "vitest";
import { getEnumStr } from "./string-utils"; import { getEnumStr } from "./string-utils";
/**
* A {@linkcode ReadonlySet} containing phase names that will not be shown in the console when started.
*
* Used to reduce console noise from very repetitive phases.
*/
const blacklistedPhaseNames: ReadonlySet<PhaseString> = new Set(["ActivatePriorityQueuePhase"]);
/** /**
* The interceptor's current state. * The interceptor's current state.
* Possible values are the following: * Possible values are the following:
@ -52,11 +45,6 @@ export class PhaseInterceptor {
private state: StateType = "idling"; private state: StateType = "idling";
/** The current target that is being ran to. */ /** The current target that is being ran to. */
private target: PhaseString; private target: PhaseString;
/**
* Whether to respect {@linkcode blacklistedPhaseNames} during logging.
* @defaultValue `true`
*/
private respectBlacklist = true;
/** /**
* Initialize a new PhaseInterceptor. * Initialize a new PhaseInterceptor.
@ -220,9 +208,7 @@ export class PhaseInterceptor {
* @param phaseName - The name of the phase to log * @param phaseName - The name of the phase to log
*/ */
private logPhase(phaseName: PhaseString): void { private logPhase(phaseName: PhaseString): void {
if (this.respectBlacklist && !blacklistedPhaseNames.has(phaseName)) {
console.log(`%cStart Phase: ${phaseName}`, `color:${PHASE_START_COLOR}`); console.log(`%cStart Phase: ${phaseName}`, `color:${PHASE_START_COLOR}`);
}
this.log.push(phaseName); this.log.push(phaseName);
} }
@ -233,16 +219,6 @@ export class PhaseInterceptor {
this.log = []; this.log = [];
} }
/**
* Toggle the Interceptor's logging blacklist, enabling or disabling logging all phases in
* {@linkcode blacklistedPhaseNames}.
* @param state - Whether the blacklist should be enabled; default `false` (disable)
*/
public toggleBlacklist(state = false): void {
this.respectBlacklist = state;
this.doLog(`Phase blacklist logging ${state ? "disabled" : "enabled"}!`);
}
/** /**
* Wrapper function to add coral coloration to phase logs. * Wrapper function to add coral coloration to phase logs.
* @param args - Arguments to original logging function * @param args - Arguments to original logging function