Skip to content

Commit f72b287

Browse files
committed
Improve logging
1 parent 860c399 commit f72b287

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/src/merger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export const mergeObject = async <TContext>({
182182
logger.debug(filePath ?? "all", `path: ${path}, strategies: ${strategies.join(", ") || "none"}`);
183183

184184
for (const strategy of strategies) {
185+
logger.debug(filePath ?? "all", `Applying strategy '${strategy}' at ${path}`);
185186
const fn = (BuiltInStrategies as any)[strategy] ?? ctx.strategies[strategy];
186187

187188
if (!fn) continue;

lib/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { createLogger } from "./logger";
12
import { Matcher } from "./matcher";
23
import {
34
StrategyStatus_OK,
@@ -73,6 +74,9 @@ export type StrategyFn<TContext = unknown> = (args: {
7374

7475
/** Custom context object, if provided by caller. */
7576
context?: TContext;
77+
78+
/** logger */
79+
logger: ReturnType<typeof createLogger>;
7680
}) => StrategyResult | Promise<StrategyResult>;
7781

7882
/**

0 commit comments

Comments
 (0)