@tsed/logger
Advanced tools
Comparing version 6.7.3 to 6.7.4
@@ -10,3 +10,2 @@ "use strict"; | ||
require("./appenders/StderrAppender"); | ||
tslib_1.__exportStar(require("../common/index"), exports); | ||
exports.$log = new index_1.Logger("default"); | ||
@@ -13,0 +12,0 @@ exports.$log.appenders |
@@ -1,4 +0,4 @@ | ||
import { Logger } from "../common"; | ||
import { Logger } from "../common.js"; | ||
export const $log = new Logger("default"); | ||
$log.appenders.set("console", { type: "console", levels: ["info", "debug", "trace", "fatal", "error", "warn"] }); | ||
//# sourceMappingURL=exports.js.map |
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
export * from "./exports"; | ||
export * from "./exports.js"; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { Layouts } from "../../layouts/class/Layouts"; | ||
import { Layouts } from "../../layouts/class/Layouts.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * ## BaseAppender |
import { __decorate } from "tslib"; | ||
import { Appender } from "../decorators/appender"; | ||
import { BaseAppender } from "../class/BaseAppender"; | ||
import { Appender } from "../decorators/appender.js"; | ||
import { BaseAppender } from "../class/BaseAppender.js"; | ||
/** | ||
@@ -5,0 +5,0 @@ * ## Console Appender |
@@ -1,2 +0,2 @@ | ||
import { AppendersRegistry } from "../registries/AppendersRegistry"; | ||
import { AppendersRegistry } from "../registries/AppendersRegistry.js"; | ||
export function Appender(options) { | ||
@@ -3,0 +3,0 @@ return (target) => { |
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
export * from "./appenders/class/BaseAppender"; | ||
export * from "./appenders/components/ConsoleAppender"; | ||
export * from "./appenders/decorators/appender"; | ||
export * from "./appenders/interfaces/AppenderConfiguration"; | ||
export * from "./appenders/registries/AppendersRegistry"; | ||
export * from "./core/LogContext"; | ||
export * from "./core/LogEvent"; | ||
export * from "./core/LogLevel"; | ||
export * from "./layouts/class/BaseLayout"; | ||
export * from "./layouts/class/LayoutReplacer"; | ||
export * from "./layouts/class/Layouts"; | ||
export * from "./layouts/components/BasicLayout"; | ||
export * from "./layouts/components/ColoredLayout"; | ||
export * from "./layouts/components/DummyLayout"; | ||
export * from "./layouts/components/JsonLayout"; | ||
export * from "./layouts/components/MessagePassThroughLayout"; | ||
export * from "./layouts/components/ObjectLayout"; | ||
export * from "./layouts/components/PatternLayout"; | ||
export * from "./layouts/constants/logColors"; | ||
export * from "./layouts/decorators/layout"; | ||
export * from "./layouts/interfaces/BasicLayoutConfiguration"; | ||
export * from "./layouts/interfaces/Replacers"; | ||
export * from "./layouts/registries/LayoutsRegistry"; | ||
export * from "./layouts/utils/StringUtils"; | ||
export * from "./layouts/utils/colorizeUtils"; | ||
export * from "./layouts/utils/logEventToObject"; | ||
export * from "./layouts/utils/timestampLevelAndCategory"; | ||
export * from "./logger/class/Logger"; | ||
export * from "./logger/class/LoggerAppenders"; | ||
export * from "./logger/utils/tableUtils"; | ||
export * from "./appenders/class/BaseAppender.js"; | ||
export * from "./appenders/components/ConsoleAppender.js"; | ||
export * from "./appenders/decorators/appender.js"; | ||
export * from "./appenders/interfaces/AppenderConfiguration.js"; | ||
export * from "./appenders/registries/AppendersRegistry.js"; | ||
export * from "./core/LogContext.js"; | ||
export * from "./core/LogEvent.js"; | ||
export * from "./core/LogLevel.js"; | ||
export * from "./layouts/class/BaseLayout.js"; | ||
export * from "./layouts/class/LayoutReplacer.js"; | ||
export * from "./layouts/class/Layouts.js"; | ||
export * from "./layouts/components/BasicLayout.js"; | ||
export * from "./layouts/components/ColoredLayout.js"; | ||
export * from "./layouts/components/DummyLayout.js"; | ||
export * from "./layouts/components/JsonLayout.js"; | ||
export * from "./layouts/components/MessagePassThroughLayout.js"; | ||
export * from "./layouts/components/ObjectLayout.js"; | ||
export * from "./layouts/components/PatternLayout.js"; | ||
export * from "./layouts/constants/logColors.js"; | ||
export * from "./layouts/decorators/layout.js"; | ||
export * from "./layouts/interfaces/BasicLayoutConfiguration.js"; | ||
export * from "./layouts/interfaces/Replacers.js"; | ||
export * from "./layouts/registries/LayoutsRegistry.js"; | ||
export * from "./layouts/utils/StringUtils.js"; | ||
export * from "./layouts/utils/colorizeUtils.js"; | ||
export * from "./layouts/utils/logEventToObject.js"; | ||
export * from "./layouts/utils/timestampLevelAndCategory.js"; | ||
export * from "./logger/class/Logger.js"; | ||
export * from "./logger/class/LoggerAppenders.js"; | ||
export * from "./logger/utils/tableUtils.js"; | ||
//# sourceMappingURL=index.js.map |
// @ts-ignore | ||
import * as dateFormat from "date-format"; | ||
import { LOG_COLORS } from "../constants/logColors"; | ||
import { colorizeEnd, colorizeStart } from "../utils/colorizeUtils"; | ||
import { format } from "../utils/StringUtils"; | ||
import { LOG_COLORS } from "../constants/logColors.js"; | ||
import { colorizeEnd, colorizeStart } from "../utils/colorizeUtils.js"; | ||
import { format } from "../utils/StringUtils.js"; | ||
export class LayoutReplacer { | ||
@@ -7,0 +7,0 @@ tokens; |
@@ -1,2 +0,2 @@ | ||
import { LayoutsRegistry } from "../registries/LayoutsRegistry"; | ||
import { LayoutsRegistry } from "../registries/LayoutsRegistry.js"; | ||
export class Layouts { | ||
@@ -3,0 +3,0 @@ static get(name, config) { |
import { __decorate } from "tslib"; | ||
import * as Util from "util"; | ||
import { timestampLevelAndCategory } from "../utils/timestampLevelAndCategory"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { Layout } from "../decorators/layout"; | ||
import { timestampLevelAndCategory } from "../utils/timestampLevelAndCategory.js"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
let BasicLayout = class BasicLayout extends BaseLayout { | ||
@@ -7,0 +7,0 @@ /** |
import { __decorate } from "tslib"; | ||
import * as Util from "util"; | ||
import { timestampLevelAndCategory } from "../utils/timestampLevelAndCategory"; | ||
import { LOG_COLORS } from "../constants/logColors"; | ||
import { Layout } from "../decorators/layout"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { timestampLevelAndCategory } from "../utils/timestampLevelAndCategory.js"; | ||
import { LOG_COLORS } from "../constants/logColors.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
let ColoredLayout = class ColoredLayout extends BaseLayout { | ||
@@ -8,0 +8,0 @@ /** |
import { __decorate } from "tslib"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { Layout } from "../decorators/layout"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
let DummyLayout = class DummyLayout extends BaseLayout { | ||
@@ -5,0 +5,0 @@ transform(loggingEvent, timezoneOffset) { |
import { __decorate } from "tslib"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { Layout } from "../decorators/layout"; | ||
import { logEventToObject } from "../utils/logEventToObject"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
import { logEventToObject } from "../utils/logEventToObject.js"; | ||
let JsonLayout = class JsonLayout extends BaseLayout { | ||
@@ -6,0 +6,0 @@ transform(loggingEvent, timezoneOffset) { |
import { __decorate } from "tslib"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { Layout } from "../decorators/layout"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
import * as Util from "util"; | ||
@@ -5,0 +5,0 @@ let MessagePassThroughLayout = class MessagePassThroughLayout extends BaseLayout { |
import { __decorate } from "tslib"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { Layout } from "../decorators/layout"; | ||
import { logEventToObject } from "../utils/logEventToObject"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
import { logEventToObject } from "../utils/logEventToObject.js"; | ||
let ObjectLayout = class ObjectLayout extends BaseLayout { | ||
@@ -6,0 +6,0 @@ transform(loggingEvent, timezoneOffset) { |
import { __decorate, __metadata } from "tslib"; | ||
import { truncateAndPad } from "../utils/StringUtils"; | ||
import { BaseLayout } from "../class/BaseLayout"; | ||
import { LayoutReplacer } from "../class/LayoutReplacer"; | ||
import { Layout } from "../decorators/layout"; | ||
import { truncateAndPad } from "../utils/StringUtils.js"; | ||
import { BaseLayout } from "../class/BaseLayout.js"; | ||
import { LayoutReplacer } from "../class/LayoutReplacer.js"; | ||
import { Layout } from "../decorators/layout.js"; | ||
const regex = /%(-?[0-9]+)?(\.?[0-9]+)?([[\]cdhmnpjrzxy%])(\{([^}]+)\})?|([^%]+)/; | ||
@@ -7,0 +7,0 @@ const TTCC_CONVERSION_PATTERN = "%r %p %c - %m%n"; |
@@ -1,2 +0,2 @@ | ||
import { LayoutsRegistry } from "../registries/LayoutsRegistry"; | ||
import { LayoutsRegistry } from "../registries/LayoutsRegistry.js"; | ||
export function Layout(options) { | ||
@@ -3,0 +3,0 @@ return (target) => { |
import Util from "util"; | ||
import { removeColors } from "./colorizeUtils"; | ||
import { removeColors } from "./colorizeUtils.js"; | ||
export function logEventToObject(loggingEvent) { | ||
@@ -4,0 +4,0 @@ const log = { |
import * as Util from "util"; | ||
// @ts-ignore | ||
import * as dateFormat from "date-format"; | ||
import { colorize } from "./colorizeUtils"; | ||
import { colorize } from "./colorizeUtils.js"; | ||
export function timestampLevelAndCategory(loggingEvent, colour, timezoneOffset) { | ||
@@ -6,0 +6,0 @@ return colorize(Util.format("[%s] [%s] [%s] - ", dateFormat.asString(loggingEvent.startTime, timezoneOffset), loggingEvent.formattedLevel, loggingEvent.categoryName), colour); |
@@ -1,6 +0,6 @@ | ||
import { LoggerAppenders } from "./LoggerAppenders"; | ||
import { drawTable } from "../utils/tableUtils"; | ||
import { LogEvent } from "../../core/LogEvent"; | ||
import { levels, LogLevel } from "../../core/LogLevel"; | ||
import { LogContext } from "../../core/LogContext"; | ||
import { LoggerAppenders } from "./LoggerAppenders.js"; | ||
import { drawTable } from "../utils/tableUtils.js"; | ||
import { LogEvent } from "../../core/LogEvent.js"; | ||
import { levels, LogLevel } from "../../core/LogLevel.js"; | ||
import { LogContext } from "../../core/LogContext.js"; | ||
export class Logger { | ||
@@ -7,0 +7,0 @@ _name; |
@@ -1,2 +0,2 @@ | ||
import { AppendersRegistry } from "../../appenders/registries/AppendersRegistry"; | ||
import { AppendersRegistry } from "../../appenders/registries/AppendersRegistry.js"; | ||
export class LoggerAppenders { | ||
@@ -3,0 +3,0 @@ _appenders = new Map(); |
@@ -6,3 +6,2 @@ import Os from "os"; | ||
import "./appenders/StderrAppender.js"; | ||
export * from "../common/index.js"; | ||
export const $log = new Logger("default"); | ||
@@ -9,0 +8,0 @@ $log.appenders |
import { Logger } from "../common/index"; | ||
import "./appenders/StdoutAppender"; | ||
import "./appenders/StderrAppender"; | ||
export * from "../common/index"; | ||
export declare const $log: Logger; |
{ | ||
"name": "@tsed/logger", | ||
"version": "6.7.3", | ||
"version": "6.7.4", | ||
"description": "A multi channel logger written in TypeScript.", | ||
"author": "Romain Lenzotti", | ||
"license": "MIT", | ||
"source": "./src/node/index.ts", | ||
"main": "./lib/cjs/node/index.js", | ||
"module": "./lib/esm/node/index.js", | ||
"source": "./src/index.ts", | ||
"main": "./lib/cjs/index.js", | ||
"module": "./lib/esm/index.js", | ||
"browser": "./lib/browser/logger.umd.js", | ||
"typings": "./lib/types/node/index.d.ts", | ||
"typings": "./lib/types/index.d.ts", | ||
"exports": { | ||
"types": "./lib/types/node/index.d.ts", | ||
"types": "./lib/types/index.d.ts", | ||
"browser": "./lib/browser/logger.umd.js", | ||
"import": "./lib/esm/node/index.js", | ||
"require": "./lib/cjs/node/index.js", | ||
"default": "./lib/esm/node/index.js" | ||
"import": "./lib/esm/index.js", | ||
"require": "./lib/cjs/index.js", | ||
"default": "./lib/esm/index.js" | ||
}, | ||
@@ -19,0 +19,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
355541
231
5405