Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
pelias-logger
Advanced tools
Pelias is a geocoder powered completely by open data, available freely to everyone.
Local Installation · Cloud Webservice · Documentation · Community Chat
The centralized logger package for Pelias, which wraps winston with Pelias-specific transports and default configurations.
The logger will set its log levels to the logger.level
property in pelias-config
, which should be set to any of the
default winston options. logger.timestamp
and
logger.colorize
take boolean values (defaulting to true
) that indicate whether log lines should have a
timestamp/be colorized.
get( name, loggerOpts )
Retrieve a logger with a specific name or, if none is found, create a new one.
name
: the name to search for/assign to the loggerloggerOpts
: if a new logger has to be created, the options to pass to
winston.Logger()
winston
The winston package is exposed via this option, to provide access to any items needed in custom loggerOpts
passed to
get()
(like winston.transports.*
classes).
var peliasLogger = require( 'pelias-logger' );
var logger1 = peliasLogger.get( 'logger1' );
var logger2 = peliasLogger.get( 'logger2', {
transports: [
new peliasLogger.winston.transports.File( {
filename: 'output.txt',
timestamp: true
})
]
});
logger1.warn( 'hello' );
FAQs
The centralized logger package for Pelias.
We found that pelias-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.