Skip to content

AIDK API Reference / aidk-kernel / LogMethod

Interface: LogMethod() ​

Defined in: packages/kernel/src/logger.ts:146

Log method signature supporting both message-first and object-first forms.

Examples ​

typescript
log.info('User logged in');
log.info('Processed %d items', count);
typescript
log.info({ userId, action: 'login' }, 'User logged in');
log.error({ err, requestId }, 'Request failed');

Call Signature ​

ts
LogMethod(msg: string, ...args: unknown[]): void;

Defined in: packages/kernel/src/logger.ts:148

Log a message with optional printf-style args

Parameters ​

ParameterType
msgstring
...argsunknown[]

Returns ​

void

Call Signature ​

ts
LogMethod(
   obj: Record<string, unknown>, 
   msg?: string, ...
   args?: unknown[]): void;

Defined in: packages/kernel/src/logger.ts:150

Log structured data with optional message

Parameters ​

ParameterType
objRecord<string, unknown>
msg?string
...args?unknown[]

Returns ​

void

Released under the MIT License.