ts-log-utils
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

ts-log-utils

Codefresh build status

TypeScript Log Utilities

Requirements

Configuration

configuration file

${project root}/config/default.yml

See config

example

log4js:
  appenders:
    out:
      type: console
    batch:
      type: dateFile
      filename: "/tmp/batch.log"
      pattern: "-yyyy-MM-dd"
      backups: 3
  categories:
    default:
      appenders:
        - out
      level: ALL
    batch:
      appenders:
        - batch
      level: ALL

Usage

install

npm install --save-dev ts-log-utils

build

npm run build

test

npm run test

coverage

npm run coverage
open ./coverage/ts-report/index.html

sample

code

import { LogUtils } from "ts-log-utils";
 
LogUtil.debug("Log me!");

webpack.config.production.js

const uglifyEsPlugin = require("uglify-es-webpack-plugin");
 
const config = {
    plugins: [
        new uglifyEsPlugin({
            compress: {
                drop_console: true
            }
        })
    ]
}
 
module.exports = config;

Readme

Keywords

none

Package Sidebar

Install

npm i ts-log-utils

Weekly Downloads

3

Version

2.2.0

License

MIT

Last publish

Collaborators

  • xtity