New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kununu/kununu-utils

Package Overview
Dependencies
Maintainers
17
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@kununu/kununu-utils

Utility functions used within kununu client applications

2.2.0
unpublished
latest
npm
Version published
Maintainers
17
Created
Source

Logs

There are 2 different loggers provided by this package. the default logger and the request logger.

Loggers can be imported using const {logger, requestLogger} = require('@kununu/kununu-utils/dist/kununu-logger');

The request logger is used by @kununu/kununu-utils/dist/middlewares/expressLogger middleware to log all app requests. The logger is mostly used for the general logs and has different rules when compared to the request logger.

Default Logger

This one has 2 types of transport. FingersCrossed if NODE_ENV is production, Console if not.

  • FingersCrossed - This follows the same logic as the Symfony FingersCrossed built-in logger, which has a minimum log level that should be printed and an activation level that will trigger print every logs stores since the last time this log level was called.
  • Console - A console log with a minimum log level.

Request Logger

The transports for request logger are always the same and NODE_ENV has no impact to it.

  • Console - A console log with a minimum log level.

Format

The log format for both loggers is always the same and is combining a timestamp and a custom log format that includes things like build, logLevel, method, user-agent, trace_id, etc.

Default Configs

  • Minimum Log Level - info or the value stored on MINIMUM_LOG_LEVEL env var.
  • Request Minimum Log Level - info or the value stored on REQUEST_MINIMUM_LOG_LEVEL env var.
  • Activation Log Level - error or the value stored on ACTIVATION_LOG_LEVEL env var.
  • Log Levels - emergency, alert, critical, error, warning, notice, info and debug.

FAQs

Package last updated on 21 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