1.3.0 • Published 5 years ago
slf4ts-winston v1.3.0
slf4ts-winston
Winston Logging-Binding for slf4ts
It's meant to be used with nodejs
.
Currently not supported:
- using custom log-levels
Example Usage
Example package.json:
{
...,
"dependencies": {
"slf4ts-winston": "latest"
},
...
}
Example code:
import { LoggerFactory, LoggerConfiguration } from "slf4ts-api";
// register winston third-party-lib
import "winston-daily-rotate-file";
const ROOT_LOGGER = LoggerFactory.getLogger();
ROOT_LOGGER.setMetadata({ application: 'my-app' });
ROOT_LOGGER.info("Test Message", { version: '1.0.0' }, new Error());
// configuration for winston loggers
const config = {
transports: [
new (winston.transports.Console)(),
new (winston.transports.File)({ filename: 'somefile.log' }),
new (winston.transports.DailyRotateFile)({
"filename": "logfilename-%DATE%.log",
"datePattern": "YYYY-MM-DD",
"logstash": true,
"level": "debug"
})
]
};
// configure the root logger ...
LoggerConfiguration.setConfig(config);
// configure a certain logger
LoggerConfiguration.setConfig(config, "my-lib", "X");
License
1.3.0
5 years ago
1.2.0
5 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.1
6 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
1.0.0-beta.7
8 years ago
1.0.0-beta.6
8 years ago
1.0.0-beta.5
8 years ago
1.0.0-beta.4
8 years ago
1.0.0-beta.3
8 years ago
1.0.0-beta.2
8 years ago
1.0.0-beta.1
8 years ago