Skip to content

Documentation / @agentick/kernel / LogMethod

Interface: LogMethod()

Defined in: 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

LogMethod(msg, ...args): void

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

Log a message with optional printf-style args

Parameters

msg

string

args

...unknown[]

Returns

void

Call Signature

LogMethod(obj, msg?, ...args): void

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

Log structured data with optional message

Parameters

obj

Record<string, unknown>

msg?

string

args

...unknown[]

Returns

void

Released under the ISC License.