Skip to content

Commit 4a19aa6

Browse files
committed
Added minor documentation.
1 parent b4fc8a3 commit 4a19aa6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: packages/common/src/utils/Logger.ts

+15
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,25 @@ export interface CreateLoggerOptions {
1818
logLevel?: ILogLevel;
1919
}
2020

21+
/**
22+
* Retrieves the base (default) logger instance.
23+
*
24+
* This base logger controls the default logging configuration and is shared
25+
* across all loggers created with `createLogger`. Adjusting settings on this
26+
* base logger affects all loggers derived from it unless explicitly overridden.
27+
*
28+
*/
2129
export function createBaseLogger() {
2230
return Logger;
2331
}
2432

33+
/**
34+
* Creates and configures a new named logger based on the base logger.
35+
*
36+
* Named loggers allow specific modules or areas of your application to have
37+
* their own logging levels and behaviors. These loggers inherit configuration
38+
* from the base logger by default but can override settings independently.
39+
*/
2540
export function createLogger(name: string, options: CreateLoggerOptions = {}): ILogger {
2641
const logger = Logger.get(name);
2742
if (options.logLevel) {

0 commit comments

Comments
 (0)