application-log-winston-interface
Version:
A wrapper around initialising Winston with Application-Log Standard levels, colours, and specific formats.
45 lines (40 loc) • 2.57 kB
Markdown
# application-log-winston-interface
[](https://github.com/RichardLitt/standard-readme)
[](https://semver.org/spec/v2.0.0.html)
[](https://conventionalcommits.org)
[](https://github.com/Anadian/application-log-winston-interface/blob/main/LICENSE)
[](https://www.npmjs.com/package/application-log-winston-interface)
[](https://github.com/Anadian/application-log-winston-interface/actions/workflows/ci.yml)
[](https://coveralls.io/github/Anadian/application-log-winston-interface?branch=main)
> A wrapper around initialising Winston with Application-Log Standard levels, colours, and specific formats.
# Table of Contents
- [Background](#Background)
- [Install](#Install)
- [Usage](#Usage)
- [API](#API)
- [Contributing](#Contributing)
- [License](#License)
# Background
A simple module that exists primarily as a convenience to initialise [Winston](https://github.com/winstonjs/winston) the way I like.
# Install
Using [pnpm](https://pnpm.io/cli/add):
```bash
pnpm add --save application-log-winston-interface
```
It can, of course, also be installed by [NPM](https://docs.npmjs.com/cli/v8/commands/npm-install) or [Yarn](https://yarnpkg.com/getting-started/usage) using the normal methods.
# Usage
# API
```js
import * as ApplicationLogWinstonInterface from 'application-log-winston-interface';
try{
var Logger = ApplicationLogWinstonInterface.initWinstonLogger( 'base_name.log', './log/directory' );
} catch(error){
//
}
```
# Contributing
Changes are tracked in [CHANGELOG.md](CHANGELOG.md).
# License
MIT ©2021 Anadian
SEE LICENSE IN [LICENSE](LICENSE)
[](http://creativecommons.org/licenses/by-sa/4.0/)This project's documentation is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).