Skip to content

Commit

Permalink
Add TypeScript example
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jun 29, 2020
1 parent 3215a1e commit e399881
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ var logger = winston.createLogger({
});
```

or in TypeScript:

```typescript
import { createLogger } from 'winston';
import * as WinstonGraylog2 from 'winston-graylog2';

const options = { ...<your config options here>... };
const logger = createLogger({
transports: [
new WinstonGraylog2(options),
],
});

logger.info(`tere`);
```

## Options

* __name__: Transport name
Expand Down

0 comments on commit e399881

Please sign in to comment.