@bussin/context-logger

0.1.1 • Public • Published

@bussin/context-logger

NPM Version NPM Version NPM Version

Additional functionality for the @sinclair/typebox library.

License: MIT

Installation

    npm install @bussin/context-logger

Quick Start

import { createLogger, IContextLogger } from '@bussin/context-logger';

const logger: IContextLogger = createLogger({ level: 'debug' });

await logger.addContext({ traceId: 1234 }, async context => {
    logger.info("this will contain traceId in log's json");



});

Metadata

import { createLogger, IContextLogger } from '@bussin/context-logger';

const logger: IContextLogger = createLogger({ level: 'debug' });

await logger.addContext({ traceId: 1234 }, async context => {
    logger.info("this will contain traceId in log's json");
});

Contributing

To contribute, all PRs should target the develop branch. Feature branches must be rebased onto the latest develop commit before merging to keep a linear git history.

This repo uses the googleapis/release-please-action GitHub Action which requires Conventional Commits messages. The commit messages are used to determine package versioning automatically so it is important that they are in the correct format. Incorrect commit messages will cause the build and release to fail.

Publishing

Package releases are handled through the Release GitHub Action via googleapis/release-please-action. A workflow run will be triggered automatically when code is merged to the develop branch. This creates a subsequent "release" PR, also targeting develop, that can optionally be merged if a release is desired. If the release PR is merged another run of the Release GitHub Action will be triggered, this time executing the "publish" job, which currently requires manual approval by Wesley Thorsen. Once approved, a GitHub Release will be created and the package will be published to NPM.

Support

Please create a PR if you find any missing functionality that you's like to add. For bugs, please use the issues tracker. I'd be happy to help you!

Package Sidebar

Install

npm i @bussin/context-logger

Weekly Downloads

13

Version

0.1.1

License

MIT

Unpacked Size

44.7 kB

Total Files

63

Last publish

Collaborators

  • wesleythorsen