![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@flytio/flyt-logger
Advanced tools
Small logging library to be used in nodejs integrations.
A small logging library for use within flyt node integrations. Flyt Logger is a thin wraper around the winston and can send logs over UDP or Console.
Install
yarn add @flytio/flyt-logger
Import FlytLogger. Create an instance of a logger using constructor. Preferably at the begining of a request.
// main.js
import { FlytLogger } from '@flytio/flyt-logger';
const logger = new FlytLogger();
Optionally you can pass requestId as a first parameter, and transport options as a second one. You can use helper factory functions to do this. You can read more about options here
import {
createTransport,
FlytLogger,
TransportType
} from '@flytio/flyt-logger';
const logger = new FlytLogger('fsdh-4234-23jh', {
transports: [
createTransport(TransportType.File, fileOptions),
createTransport(TransportType.UDP, udpOptions),
createTransport(TransportType.Console, consoleOptions)
]
});
Once we have initialised we can use any of the logging methods available. Each logging method accepts a message and an optional metadata object if you wish to send any other data that you think appropiate.
// Info messages should be a simple meesage describing what is happening.
logger.info('sendCollectionOrder request started');
// Debug messages should have more context.
logger.debug(`pos response: ${JSON.stringify(responseFromPos)}`);
// Error messages should log out any errors that happen in your application.
logger.error(`order failed to send: ${JSON.stringify(error)}`);
FAQs
Small logging library to be used in nodejs integrations.
The npm package @flytio/flyt-logger receives a total of 0 weekly downloads. As such, @flytio/flyt-logger popularity was classified as not popular.
We found that @flytio/flyt-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.