Skip to content

Commit

Permalink
added CONTRIBUTING.md and updated README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
steenzout committed Nov 20, 2015
1 parent b263277 commit 777bc4c
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

You can contribute in the following ways:

- report problems or make feature request in the
[Github Issues section](https://github.com/mediaFORGE/gol/issues) of the project
- fork this repo and make a pull request
- build an example
- add documentation

We use [gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/) so
be sure when you send a pull request you refer the `mediaFORGE/gol` `develop` branch.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,64 @@
[![Build Status](https://travis-ci.org/mediaFORGE/gol.svg?branch=develop)](https://travis-ci.org/mediaFORGE/gol)

[![Coverage Status](https://coveralls.io/repos/steenzout/gol/badge.svg?branch=develop&service=github)](https://coveralls.io/github/steenzout/gol?branch=develop)

gol is an easily extensible concurrent logging library.

If you would like to contribute
check [CONTRIBUTING.md](https://github.com/mediaFORGE/gol/tree/master/CONTRIBUTING.md).


## Example

```
package main
import (
"fmt"
"os"
"github.com/mediaFORGE/gol"
"github.com/mediaFORGE/gol/formatters"
field_severity "github.com/mediaFORGE/gol/fields/severity"
filter_severity "github.com/mediaFORGE/gol/filters/severity"
logger_simple "github.com/mediaFORGE/gol/loggers/simple"
manager_simple "github.com/mediaFORGE/gol/managers/simple"
)
// LogWorkers the number of log message workers.
const LogWorkers = 4
// Log holds the application LogManager instance.
var Log gol.LoggerManager
func init() {
fmt.Println("init():start")
Log = manager_simple.New(LogWorkers)
f := filter_severity.New(field_severity.Info)
formatter := formatters.Text{}
logger := logger_simple.New(f, formatter, os.Stdout)
Log.Register("main", logger)
Log.Run()
Log.Send(gol.NewInfo("message", "main.Log has been configured"))
fmt.Println("init():end")
}
func main() {
fmt.Println("Started application.")
defer func() {
Log.Close()
fmt.Println("Ended application.")
}()
// send 10,000 messages
for i := 0; i < 100000; i++ {
Log.Send(gol.NewInfo("i", fmt.Sprintf("%d", i)))
}
fmt.Println("Ending application...")
}
```

More examples can be found [here](https://github.com/mediaFORGE/gol/tree/master/internal/examples).

0 comments on commit 777bc4c

Please sign in to comment.