1.5.0 • Published 2 years ago

winston-cloudrun v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

winston-cloudrun

Deploy Coverage Status

Winston Cloud Run config for logging to stdout in json format with correctly specified time and severity.

Installation:

npm i winston-cloudrun

Usage:

import { createLogger } from 'winston';
import { getWinstonCloudRunConfig } from 'winston-cloudrun';

const logger = createLogger(getWinstonCloudRunConfig({
  production: true
}));

logger.info('Processing important task...', { data: 'abc' });
/*
{ "severity": "INFO", message: "Processing important task...", data: "abc", time: "2021-06-17T10:39:00.576Z" }
*/

Or use only format:

...
import { getCloudLoggingFormat } from 'winston-cloudrun';

const logger = createLogger({
  format: getCloudLoggingFormat(),
  ...
});

Bootstrapped with: create-ts-lib-gh

This project is Mit Licensed.

1.5.0

2 years ago

1.2.0

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.0

3 years ago

1.0.0

3 years ago