1- # logger
1+ > This repository is part of the [ Pelias] ( https://github.com/pelias/pelias )
2+ > project. Pelias is an open-source, open-data geocoder originally sponsored by
3+ > [ Mapzen] ( https://www.mapzen.com/ ) . Our official user documentation is
4+ > [ here] ( https://github.com/pelias/documentation ) .
25
3- [ ![ Greenkeeper badge] ( https://badges.greenkeeper.io/pelias/logger.svg )] ( https://greenkeeper.io/ )
4-
5- [ ![ NPM] ( https://nodei.co/npm/pelias-logger.png )] ( https://nodei.co/npm/pelias-logger/ )
6+ # Pelias Logger
67
78The centralized logger package for Pelias, which wraps [ winston] ( https://github.com/winstonjs/winston ) with
89Pelias-specific transports and default configurations.
910
10- ### config
11+ [ ![ Greenkeeper badge] ( https://badges.greenkeeper.io/pelias/logger.svg )] ( https://greenkeeper.io/ )
12+ [ ![ NPM] ( https://nodei.co/npm/pelias-logger.png )] ( https://nodei.co/npm/pelias-logger/ )
13+
14+ ### Config
1115The logger will set its log levels to the ` logger.level ` property in ` pelias-config ` , which should be set to any of the
1216default winston [ options] ( https://github.com/winstonjs/winston#logging-levels ) . ` logger.timestamp ` and
1317` logger.colorize ` take boolean values (defaulting to ` true ` ) that indicate whether log lines should have a
1418timestamp/be colorized.
1519
16- ### API
20+ ### Interface
1721##### ` get( name, loggerOpts ) `
1822Retrieve a logger with a specific name or, if none is found, create a new one.
1923
@@ -25,7 +29,7 @@ Retrieve a logger with a specific name or, if none is found, create a new one.
2529The winston package is exposed via this option, to provide access to any items needed in custom ` loggerOpts ` passed to
2630` get() ` (like ` winston.transports.* ` classes).
2731
28- ### example
32+ ### Example
2933``` javascript
3034var peliasLogger = require ( ' pelias-logger' );
3135var logger1 = peliasLogger .get ( ' logger1' );
0 commit comments