2.2.0 • Published 6 years ago
ts-log-utils v2.2.0
ts-log-utils
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;