@tricycle/log-winston
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@tricycle/log-winston : Winston Logger Middleware for TricycleJS

Description

Tricycle Log Winston is a middleware library for TricycleJS that attaches a Winston logger that outputs to the Azure Functions log to the TricycleJS context.

Installation

npm install @tricycle/log-winston

Usage

When creating the application's instance of Tricycle:

import Tricycle from '@tricycle/tricycle';
import { winstonLog, WinstonContext } from '@tricycle/log-winston';

export default new Tricycle<WinstonContext>()
    .use(winstonLog({ format: format.simple() });

Within middleware or endpoints:

ctx.log.info('This will write to the Azure Functions logger');

Links

History

  • v0.1.2
    • Upgrade to work with Tricycle v0.1.x.
    • Simplify tests.
    • Improve build and publish.
    • Exclude .github from npm publish.
  • v0.1.1
    • Update Tricycle and update tests to match.
    • Add Usage to readme.
  • v0.1.0
    • Working logger middleware.
  • v0.0.2
    • Fix build.
  • v0.0.1
    • Initial release. Work in progress. Testing integration.

Legal & License

Copyright 2022 Adam Mill

This library is released under Apache 2 license. See LICENSE for more details.

Package Sidebar

Install

npm i @tricycle/log-winston

Weekly Downloads

1

Version

0.1.2

License

Apache-2.0

Unpacked Size

63.2 kB

Total Files

24

Last publish

Collaborators

  • tricycle