UNPKG

@linkedmink/node-route53-dynamic-dns

Version:

Background process that updates AWS Route 53 DNS address records whenever the public IP of the hosting environment changes

28 lines (27 loc) 1.23 kB
import * as winston from "winston"; import { LogLevel } from "../constants/logging.mjs"; import { EnvironmentConfig } from "./environment-config.mjs"; /** * Wrap the Winston logger container, so we can get the same logger for each module. * @param label The label of the module we're logging * @return An instance of the logger */ export declare const loggerForLabel: (label?: string) => winston.Logger; /** * @param moduleUrl Use {@link ImportMeta.url import.meta.url} for ESM modules to generate label * @return An instance of the logger */ export declare const loggerForModuleUrl: (moduleUrl: string) => winston.Logger; /** * Wrap expensive operations, so we don't perform them for logging unless logging for the level is enabled * @param logger * @param level * @param messageFunc */ export declare const logWhenEnabled: (logger: winston.Logger, level: LogLevel, messageFunc: (loggerLevel: LogLevel) => string) => void; /** * Sets the options to construct winston loggers and configures logging for unhandled errors * @param config Configuration determines the output transport streams * @returns The default global logger */ export declare const initializeLogging: (config: EnvironmentConfig) => winston.Logger;