ts-smart-logger
An implementation of logger at TypeScript (TS 2 compatible).
Installation
First you need to install the npm module:
npm install ts-smart-logger --save
Use
main.ts
; LoggerFactory.configure;// orLoggerFactory.configure;// orLoggerFactory.configurerequire'./config/log/default.json';// orLoggerFactory.configurerequire'./config/log/ProductionLoggerConfig'.ProductionLoggerConfig;
LoggedFirstClass.ts
config.json
Configure the runtime
$$LoggerFactory.storeConfig
Attention Since the "LoggerFactory" may be shared between the different dependencies we must include the script "npm dedupe" in this case into the package.json:
... "scripts": , ...
Publish
npm run deploy
License
Licensed under MIT.