https://github.com/screwdriver-cd/logger
Common logging provider for screwdriver components
https://github.com/screwdriver-cd/logger
Last synced: 4 months ago
JSON representation
Common logging provider for screwdriver components
- Host: GitHub
- URL: https://github.com/screwdriver-cd/logger
- Owner: screwdriver-cd
- License: other
- Created: 2019-11-20T22:34:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-14T07:15:29.000Z (over 1 year ago)
- Last Synced: 2025-08-23T05:09:32.251Z (10 months ago)
- Language: JavaScript
- Homepage: https://cd.screwdriver.cd/pipelines/3554/events
- Size: 13.7 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# screwdriver-logger
[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]
> Wrapper around [winston] for a common logging interface for Screwdriver repos
## Usage
```bash
npm install screwdriver-logger
```
This module wraps the [winston] package and provides a simple uniform interface for handling logs.
```js
const logger = require('screwdriver-logger');
try {
// Do something
return logger.info('Server running at %s', server.info.uri);
} catch (err) {
logger.error(err.toString());
return process.exit(1);
}
```
## Testing
```bash
npm test
```
## License
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
[npm-image]: https://img.shields.io/npm/v/screwdriver-logger.svg
[npm-url]: https://npmjs.org/package/screwdriver-logger
[downloads-image]: https://img.shields.io/npm/dt/screwdriver-logger.svg
[license-image]: https://img.shields.io/npm/l/screwdriver-logger.svg
[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/screwdriver.svg
[issues-url]: https://github.com/screwdriver-cd/screwdriver/issues
[status-image]: https://cd.screwdriver.cd/pipelines/3554/badge
[status-url]: https://cd.screwdriver.cd/pipelines/3554
[winston]: https://www.npmjs.com/package/winston