fix loopCount debug to actually log
This commit is contained in:
parent
e06abac9cf
commit
1bb8c1a308
|
@ -7,7 +7,7 @@ import { QueuedRoll } from 'artigen/managers/manager.d.ts';
|
|||
|
||||
import { loggingEnabled, loopLoggingEnabled } from 'artigen/utils/logFlag.ts';
|
||||
|
||||
(loggingEnabled || loopLoggingEnabled) && initLog('logs/worker', loggingEnabled || loopLoggingEnabled);
|
||||
if (loggingEnabled || loopLoggingEnabled) initLog('logs/worker', loggingEnabled || loopLoggingEnabled);
|
||||
|
||||
// Extend the BigInt prototype to support JSON.stringify
|
||||
interface BigIntX extends BigInt {
|
||||
|
@ -45,6 +45,6 @@ self.onmessage = async (e: MessageEvent<QueuedRoll>) => {
|
|||
},
|
||||
};
|
||||
self.postMessage(returnMsg);
|
||||
loggingEnabled && (await closeLog());
|
||||
if (loggingEnabled || loopLoggingEnabled) await closeLog();
|
||||
self.close();
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ import { loggingEnabled } from 'artigen/utils/logFlag.ts';
|
|||
export const escapeCharacters = (str: string, esc: string): string => {
|
||||
// Loop thru each esc char one at a time
|
||||
for (const e of esc) {
|
||||
loopCountCheck('escape.ts - escaping characters');
|
||||
loopCountCheck(`escape.ts - escaping character ${e}`);
|
||||
|
||||
loggingEnabled && log(LT.LOG, `Escaping character ${e} | ${str}, ${esc}`);
|
||||
// Create a new regex to look for that char that needs replaced and escape it
|
||||
|
|
Loading…
Reference in New Issue