@baileyherbert/logging
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,84 @@ | ||
/** | ||
* Customizes options for prefixes. | ||
*/ | ||
export interface PrefixGeneratorOptions { | ||
/** | ||
* Whether to align labels. | ||
* @default true | ||
*/ | ||
includeLabelAlignment?: boolean; | ||
/** | ||
* Whether to include labels in the output. | ||
* @default true | ||
*/ | ||
includeLabels?: boolean; | ||
/** | ||
* Whether to include logger names in the output. | ||
* @default true | ||
*/ | ||
includeLoggerNames?: boolean; | ||
/** | ||
* Customizes timestamps. | ||
*/ | ||
timestamps?: { | ||
/** | ||
* Whether to include the current time. | ||
* @default true | ||
*/ | ||
includeTimes?: boolean; | ||
/** | ||
* Whether to include milliseconds in the current time. | ||
* @default true | ||
*/ | ||
includeTimeMillis?: boolean; | ||
/** | ||
* Whether to include the current date. | ||
* @default false | ||
*/ | ||
includeDates?: boolean; | ||
/** | ||
* Whether to include the timezone offset (ie `UTC+0:00`). | ||
* @default false | ||
*/ | ||
includeTimeZone?: boolean; | ||
}; | ||
/** | ||
* Customizes the labels to use in prefixes. | ||
*/ | ||
customLabels?: LogLevelMap<string>; | ||
/** | ||
* Customizes the colors to use for labels (logging levels). | ||
*/ | ||
customLabelColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
/** | ||
* Customizes the colors to use for timestamps. | ||
*/ | ||
customTimestampColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
/** | ||
* Customizes the color of logger names. | ||
*/ | ||
customLoggerColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
/** | ||
* Customizes the color of the brackets around logger names. When not set, it will default to the value of | ||
* `customBracketColors`. | ||
*/ | ||
customLoggerBracketColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
/** | ||
* Customizes the color of brackets around the prefix. | ||
*/ | ||
customBracketColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
/** | ||
* Customizes the color of hyphen separators in prefixes. | ||
*/ | ||
customHyphenColors?: LogLevelMap<ChalkColor> | ChalkColor; | ||
} | ||
declare type ChalkColor = (...text: unknown[]) => string; | ||
declare type LogLevelMap<T> = { | ||
trace?: T; | ||
debug?: T; | ||
information?: T; | ||
warning?: T; | ||
error?: T; | ||
critical?: T; | ||
}; | ||
export {}; |
{ | ||
"name": "@baileyherbert/logging", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Just another logging solution.", | ||
@@ -5,0 +5,0 @@ "author": "Bailey Herbert <hello+npm@bailey.sh> (https://bailey.sh)", |
80434
1468