Skip to content

Commit 3c910c1

Browse files
authored
Merge pull request #405 from objectstack-ai/copilot/update-action-run-steps
2 parents 856c549 + e5e8e95 commit 3c910c1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/core/src/logger.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type { Logger } from './contracts/logger.js';
1717
* - Distributed tracing support (traceId, spanId)
1818
*/
1919
export class ObjectLogger implements Logger {
20-
private config: Required<Omit<LoggerConfig, 'file' | 'rotation'>> & { file?: string; rotation?: { maxSize: string; maxFiles: number } };
20+
private config: Required<Omit<LoggerConfig, 'file' | 'rotation' | 'name'>> & { file?: string; rotation?: { maxSize: string; maxFiles: number }; name?: string };
2121
private isNode: boolean;
2222
private pinoLogger?: any; // Pino logger instance for Node.js
2323
private pinoInstance?: any; // Base Pino instance for creating child loggers
@@ -32,6 +32,7 @@ export class ObjectLogger implements Logger {
3232
format: config.format ?? (this.isNode ? 'json' : 'pretty'),
3333
redact: config.redact ?? ['password', 'token', 'secret', 'key'],
3434
sourceLocation: config.sourceLocation ?? false,
35+
name: config.name,
3536
file: config.file,
3637
rotation: config.rotation ?? {
3738
maxSize: '10m',
@@ -64,6 +65,11 @@ export class ObjectLogger implements Logger {
6465
}
6566
};
6667

68+
// Add name if provided
69+
if (this.config.name) {
70+
pinoOptions.name = this.config.name;
71+
}
72+
6773
// Transport configuration for pretty printing or file output
6874
const targets: any[] = [];
6975

0 commit comments

Comments
 (0)