Skip to content

Commit

Permalink
Merge pull request #5 from Enigmatis/add-readme
Browse files Browse the repository at this point in the history
Add readme
  • Loading branch information
chenshoo authored Dec 8, 2019
2 parents e96412f + c5355e9 commit 7bee052
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# graphql-logger
A library that organizes graphql logs
![Small Logo](static/img/polaris-logo.png)

# polaris-graphql-logger

[![Build Status](https://travis-ci.com/Enigmatis/polaris-graphql-logger.svg?branch=master)](https://travis-ci.com/Enigmatis/polaris-graphql-logger)
[![NPM version](https://img.shields.io/npm/v/@enigmatis/polaris-graphql-logger.svg?style=flat-square)](https://www.npmjs.com/package/@enigmatis/polaris-graphql-logger)

#### Install

```
npm install polaris-graphql-logger
```

### Overview

Polaris GraphQL Logger allows you to write standardized logs easily, using a polaris-logs logger, and wrapping a classic
graphql logger.

#### GraphQLLogProperties

This interface defines the graphql log properties that can be logged whenever the logger is called.
This interface extends the `PolarisLogProperties` that `polaris-logs` library offers.
The property that `GraphQLLogProperties` adds in addition is:

- operationName(_string - Optional_): the name of the requested graphql operation.

#### GraphQLLogger

This interface defines all of the logging level options that available in the graphql logger.
It provides the usual methods of logger, such as `warn`, `error`, `fatal`, `info`, `trace` and `debug`.

#### PolarisGraphQLLogger

This class gives you the ability to send PolarisGraphQLContext and PolarisLogProperties and have it build a log according
to the standard way.
Binary file added static/img/polaris-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bee052

Please sign in to comment.