winston-cloudwatch
Advanced tools
Comparing version
@@ -0,1 +1,5 @@ | ||
### 2.0.7 | ||
updated TS definitions | ||
### 2.0.6 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "winston-cloudwatch", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Send logs to Amazon Cloudwatch using Winston.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
# winston-cloudwatch [v2.0.6](https://github.com/lazywithclass/winston-cloudwatch/blob/master/CHANGELOG.md#206) | ||
# winston-cloudwatch [v2.0.7](https://github.com/lazywithclass/winston-cloudwatch/blob/master/CHANGELOG.md#207) | ||
@@ -3,0 +3,0 @@ [](https://travis-ci.org/lazywithclass/winston-cloudwatch) [](https://coveralls.io/github/lazywithclass/winston-cloudwatch?branch=master) [](https://david-dm.org/lazywithclass/winston-cloudwatch) [](https://david-dm.org/lazywithclass/winston-cloudwatch#info=devDependencies) [](https://david-dm.org/lazywithclass/winston-cloudwatch#info=peerDependencies) |
@@ -1,8 +0,7 @@ | ||
import Transport = require("winston-transport"); | ||
import TransportStream = require("winston-transport"); | ||
import { CloudWatch, CloudWatchLogs } from "aws-sdk"; | ||
type LogObject = { level: string; msg: string; meta?: any }; | ||
class WinstonCloudWatch extends Transport { | ||
// Declare the default WinstonCloudwatch class | ||
declare class WinstonCloudwatch extends TransportStream { | ||
kthxbye(callback: () => void): void; | ||
@@ -40,24 +39,27 @@ upload( | ||
ignoreInProgress(cb: ((err: Error) => void)): void; | ||
constructor (options?: CloudwatchTransportOptions): WinstonCloudWatch; | ||
constructor (options?: WinstonCloudwatch.CloudwatchTransportOptions); | ||
} | ||
// Export the default winston cloudwatch class | ||
export = WinstonCloudwatch; | ||
interface CloudwatchTransportOptions { | ||
level?: string; | ||
logGroupName?: string | (() => string); | ||
logStreamName?: string | (() => string); | ||
awsAccessKeyId?: string; | ||
awsSecretKey?: string; | ||
awsRegion?: string; | ||
awsOptions?: CloudWatch.Types.ClientConfiguration; | ||
jsonMessage?: boolean; | ||
messageFormatter?: (logObject: LogObject) => string; | ||
proxyServer?: string; | ||
uploadRate?: number; | ||
errorHandler?: ((err: Error) => void); | ||
silent?: boolean; | ||
} | ||
// Declare optional exports | ||
declare namespace WinstonCloudwatch { | ||
declare module "winston-cloudwatch" { | ||
export = WinstonCloudWatch; | ||
export type LogObject = { level: string; msg: string; meta?: any }; | ||
export interface CloudwatchTransportOptions { | ||
level?: string; | ||
logGroupName?: string | (() => string); | ||
logStreamName?: string | (() => string); | ||
awsAccessKeyId?: string; | ||
awsSecretKey?: string; | ||
awsRegion?: string; | ||
awsOptions?: CloudWatch.Types.ClientConfiguration; | ||
jsonMessage?: boolean; | ||
messageFormatter?: (logObject: LogObject) => string; | ||
proxyServer?: string; | ||
uploadRate?: number; | ||
errorHandler?: ((err: Error) => void); | ||
silent?: boolean; | ||
} | ||
} | ||
56621
0.39%1203
0.25%