Skip to content

Commit

Permalink
Merge pull request #6 from JesseWeinstein/add_docs
Browse files Browse the repository at this point in the history
Add some Usage docs
  • Loading branch information
whyrusleeping authored Sep 4, 2016
2 parents 236d881 + fa870dd commit 7c24d3c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
[![Coverage Status](https://coveralls.io/repos/github/ipfs/go-log/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-log?branch=master)
[![Build Status](https://travis-ci.org/ipfs/go-log.svg?branch=master)](https://travis-ci.org/ipfs/go-log)

> A logging library used by go-ipfs
> The logging library used by go-ipfs
It currently uses a modified version of [go-logging](https://github.com/whyrusleeping/go-logging) to implement the standard printf-style log output.

## Install

Expand All @@ -18,7 +20,12 @@ go get github.com/ipfs/go-log

## Usage

TODO
Once the pacakge is imported under the name `logging`, an instance of `EventLogger` can be created like so:

````go
var log = logging.Logger("subsystem name")
```
It can then be used to emit log messages, either plain printf-style messages at six standard levels or structured messages using `Event` and `EventBegin` methods.

## Contribute

Expand All @@ -32,4 +39,4 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c

## License

MIT
MIT

0 comments on commit 7c24d3c

Please sign in to comment.