You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

pelias-logger

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-logger

The centralized logger package for Pelias.


Version published
Maintainers
1
Install size
3.08 MB
Created

Readme

Source

A modular, open-source search engine for our world.

Pelias is a geocoder powered completely by open data, available freely to everyone.

Local Installation · Cloud Webservice · Documentation · Community Chat

What is Pelias?
Pelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.

We think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.

Logger

The centralized logger package for Pelias, which wraps winston with Pelias-specific transports and default configurations.

Config

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.

Interface

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 logger
  • loggerOpts: 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).

Example

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' );

Keywords

FAQs

Package last updated on 17 Mar 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc