diff --git a/yarn-project/aztec.js/src/utils/node.ts b/yarn-project/aztec.js/src/utils/node.ts index 51c815aa5fea..8f8310d6c657 100644 --- a/yarn-project/aztec.js/src/utils/node.ts +++ b/yarn-project/aztec.js/src/utils/node.ts @@ -1,8 +1,8 @@ import { type AztecNode } from '@aztec/circuit-types'; -import { type DebugLogger } from '@aztec/foundation/log'; +import { type Logger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; -export const waitForNode = async (node: AztecNode, logger?: DebugLogger) => { +export const waitForNode = async (node: AztecNode, logger?: Logger) => { await retryUntil(async () => { try { logger?.verbose('Attempting to contact Aztec node...'); diff --git a/yarn-project/epoch-cache/src/epoch_cache.ts b/yarn-project/epoch-cache/src/epoch_cache.ts index 4c4314893b2a..f2a1b09fdc68 100644 --- a/yarn-project/epoch-cache/src/epoch_cache.ts +++ b/yarn-project/epoch-cache/src/epoch_cache.ts @@ -32,7 +32,7 @@ export class EpochCache { private committee: EthAddress[]; private cachedEpoch: bigint; private cachedSampleSeed: bigint; - private readonly log: Logger = createLogger('aztec:EpochCache'); + private readonly log: Logger = createLogger('epoch-cache'); constructor( private rollup: RollupContract, diff --git a/yarn-project/foundation/src/wasm/wasm_module.ts b/yarn-project/foundation/src/wasm/wasm_module.ts index 0b597f4b7bf2..b98a72e4455d 100644 --- a/yarn-project/foundation/src/wasm/wasm_module.ts +++ b/yarn-project/foundation/src/wasm/wasm_module.ts @@ -59,7 +59,7 @@ export class WasmModule implements IWasmModule { constructor( private module: WebAssembly.Module | Buffer, private importFn: (module: WasmModule) => any, - loggerName = 'aztec:wasm', + loggerName = 'wasm', ) { this.debug = createDebugOnlyLogger(loggerName); this.mutexQ.put(true); diff --git a/yarn-project/ivc-integration/src/scripts/generate_ts_from_abi.ts b/yarn-project/ivc-integration/src/scripts/generate_ts_from_abi.ts index af44a1f6bdad..8adfaa721dcc 100644 --- a/yarn-project/ivc-integration/src/scripts/generate_ts_from_abi.ts +++ b/yarn-project/ivc-integration/src/scripts/generate_ts_from_abi.ts @@ -5,7 +5,7 @@ import { type CompiledCircuit } from '@noir-lang/types'; import { pascalCase } from 'change-case'; import { promises as fs } from 'fs'; -const log = createConsoleLogger('aztec:mock-circuits'); +const log = createConsoleLogger('mock-circuits'); const circuits = [ 'app_creator', diff --git a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_private_kernel_reset_data.ts b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_private_kernel_reset_data.ts index 3ce3065dd95b..3b27d0dae745 100644 --- a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_private_kernel_reset_data.ts +++ b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_private_kernel_reset_data.ts @@ -14,7 +14,7 @@ import { createConsoleLogger } from '@aztec/foundation/log'; import { promises as fs } from 'fs'; -const log = createConsoleLogger('aztec:autogenerate'); +const log = createConsoleLogger('autogenerate'); const outputFilename = './src/private_kernel_reset_data.ts'; diff --git a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts index e5c07dead20c..2a9d4a3f74f8 100644 --- a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts +++ b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts @@ -5,7 +5,7 @@ import { type CompiledCircuit } from '@noir-lang/types'; import { pascalCase } from 'change-case'; import { promises as fs } from 'fs'; -const log = createConsoleLogger('aztec:autogenerate'); +const log = createConsoleLogger('autogenerate'); const circuits = [ 'parity_base', diff --git a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_vk_hashes.ts b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_vk_hashes.ts index 418f2451b44e..403e2ce8f618 100644 --- a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_vk_hashes.ts +++ b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_vk_hashes.ts @@ -6,7 +6,7 @@ import { fileURLToPath } from '@aztec/foundation/url'; import { promises as fs } from 'fs'; import { join } from 'path'; -const log = createConsoleLogger('aztec:autogenerate'); +const log = createConsoleLogger('autogenerate'); function resolveRelativePath(relativePath: string) { return fileURLToPath(new URL(relativePath, import.meta.url).href); diff --git a/yarn-project/protocol-contracts/src/scripts/generate_data.ts b/yarn-project/protocol-contracts/src/scripts/generate_data.ts index d1044644e62a..e7f1545a3b57 100644 --- a/yarn-project/protocol-contracts/src/scripts/generate_data.ts +++ b/yarn-project/protocol-contracts/src/scripts/generate_data.ts @@ -23,7 +23,7 @@ import path from 'path'; import { buildProtocolContractTree } from '../build_protocol_contract_tree.js'; -const log = createConsoleLogger('aztec:autogenerate'); +const log = createConsoleLogger('autogenerate'); const noirContractsRoot = '../../noir-projects/noir-contracts'; const srcPath = path.join(noirContractsRoot, './target'); diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 043184ef30cb..b7736ee26958 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -24,7 +24,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", - "start": "DEBUG='aztec:*' && node ./dest/bin/index.js", + "start": "LOG_LEVEL=${LOG_LEVEL:-debug} && node ./dest/bin/index.js", "generate": "node ./scripts/generate_package_info.js" }, "inherits": [ diff --git a/yarn-project/pxe/src/utils/index.ts b/yarn-project/pxe/src/utils/index.ts index f54e87e2cb26..f971258aca0f 100644 --- a/yarn-project/pxe/src/utils/index.ts +++ b/yarn-project/pxe/src/utils/index.ts @@ -1,7 +1,7 @@ import { BBNativePrivateKernelProver } from '@aztec/bb-prover'; import { type AztecNode, type PrivateKernelProver } from '@aztec/circuit-types'; import { randomBytes } from '@aztec/foundation/crypto'; -import { createDebugLogger } from '@aztec/foundation/log'; +import { createLogger } from '@aztec/foundation/log'; import { KeyStore } from '@aztec/key-store'; import { createStore } from '@aztec/kv-store/lmdb'; import { L2TipsStore } from '@aztec/kv-store/stores'; @@ -38,10 +38,10 @@ export async function createPXEService( } as PXEServiceConfig; const keyStore = new KeyStore( - await createStore('pxe_key_store', configWithContracts, createDebugLogger('aztec:pxe:keystore:lmdb')), + await createStore('pxe_key_store', configWithContracts, createLogger('pxe:keystore:lmdb')), ); - const store = await createStore('pxe_data', configWithContracts, createDebugLogger('aztec:pxe:data:lmdb')); + const store = await createStore('pxe_data', configWithContracts, createLogger('pxe:data:lmdb')); const db = await KVPxeDatabase.create(store); const tips = new L2TipsStore(store, 'pxe'); @@ -62,6 +62,6 @@ function createProver(config: PXEServiceConfig, logSuffix?: string) { throw new Error(`Prover must be configured with binary path and working directory`); } const bbConfig = config as Required> & PXEServiceConfig; - const log = createDebugLogger('aztec:pxe:bb-native-prover' + (logSuffix ? `:${logSuffix}` : '')); + const log = createLogger('pxe:bb-native-prover' + (logSuffix ? `:${logSuffix}` : '')); return BBNativePrivateKernelProver.new({ bbSkipCleanup: false, ...bbConfig }, log); }