Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -2,7 +2,7 @@ import pino, { type DestinationStream, type Logger, type LoggerOptions } from "p
|
||||
|
||||
export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal" | "silent";
|
||||
|
||||
export type ToolctrlLogger = Pick<Logger, "debug" | "info" | "warn" | "error" | "child">;
|
||||
export type HiveGridLogger = Pick<Logger, "debug" | "info" | "warn" | "error" | "child">;
|
||||
|
||||
const REDACT_PATHS = [
|
||||
"authorization",
|
||||
@@ -33,10 +33,10 @@ export interface CreateLoggerOptions extends Omit<LoggerOptions, "base" | "level
|
||||
}
|
||||
|
||||
export function resolveLogLevel(env: NodeJS.ProcessEnv = process.env): LogLevel {
|
||||
return (env.TOOLCTRL_LOG_LEVEL ?? env.LOG_LEVEL ?? "info") as LogLevel;
|
||||
return (env.HIVEGRID_LOG_LEVEL ?? env.LOG_LEVEL ?? "info") as LogLevel;
|
||||
}
|
||||
|
||||
export function createLogger(options: CreateLoggerOptions = {}): ToolctrlLogger {
|
||||
export function createLogger(options: CreateLoggerOptions = {}): HiveGridLogger {
|
||||
const { level = resolveLogLevel(), stream, ...pinoOptions } = options;
|
||||
|
||||
return pino(
|
||||
@@ -53,7 +53,7 @@ export function createLogger(options: CreateLoggerOptions = {}): ToolctrlLogger
|
||||
);
|
||||
}
|
||||
|
||||
export function createChildLogger(logger: ToolctrlLogger, bindings: Record<string, unknown>): ToolctrlLogger {
|
||||
export function createChildLogger(logger: HiveGridLogger, bindings: Record<string, unknown>): HiveGridLogger {
|
||||
return logger.child(bindings);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user