UNPKG

@graphql-hive/logger-winston

Version:
36 lines (24 loc) 1.41 kB
# @graphql-hive/logger-winston ## 1.0.1-alpha-6320ab2b4f44b7f1eeab71d7bc1abf3031611f73 ### Patch Changes - [#696](https://github.com/graphql-hive/gateway/pull/696) [`eac3a9d`](https://github.com/graphql-hive/gateway/commit/eac3a9dcb9060e5e1519fe6e92dcc0daeb067eb9) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates: - Updated dependency [`@graphql-mesh/types@^0.103.18` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.103.18) (from `^0.103.6`, in `dependencies`) ## 1.0.0 ### Major Changes - [#622](https://github.com/graphql-hive/gateway/pull/622) [`16f9bd9`](https://github.com/graphql-hive/gateway/commit/16f9bd981d5779c585c00bf79e790c94b00326f1) Thanks [@ardatan](https://github.com/ardatan)! - **Winston Adapter** Now you can integrate [Winston](https://github.com/winstonjs/winston) into Hive Gateway on Node.js ```ts import { defineConfig } from '@graphql-hive/gateway'; import { createLoggerFromWinston } from '@graphql-hive/winston'; import { createLogger, format, transports } from 'winston'; // Create a Winston logger const winstonLogger = createLogger({ level: 'info', format: format.combine(format.timestamp(), format.json()), transports: [new transports.Console()], }); export const gatewayConfig = defineConfig({ // Create an adapter for Winston logging: createLoggerFromWinston(winstonLogger), }); ```