2.2.0 • Published 8 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: ALLUsage
install
npm install --save-dev ts-log-utilsbuild
npm run buildtest
npm run testcoverage
npm run coverage
open ./coverage/ts-report/index.htmlsample
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;