Upgrade server dependencies, manage them with govendor

This commit is contained in:
Ken-Håvard Lieng 2017-04-18 03:02:51 +02:00
parent ebee2746d6
commit 971278e7e5
1748 changed files with 196165 additions and 194500 deletions

View file

@ -44,7 +44,7 @@ Available Loggers are:
* FATAL
These each are loggers based on the log standard library and follow the
standard usage. Eg..
standard usage. Eg.
```go
import (
@ -79,6 +79,13 @@ standard usage. Eg..
```
NOTE: You can also use the library in a non-global setting by creating an instance of a Notebook:
```go
notepad = jww.NewNotepad(jww.LevelInfo, jww.LevelTrace, os.Stdout, ioutil.Discard, "", log.Ldate|log.Ltime)
notepad.WARN.Println("Some warning"")
```
_Why 7 levels?_
Maybe you think that 7 levels are too much for any application... and you
@ -118,35 +125,15 @@ verbosity.
Note that JWW's own internal output uses log levels as well, so set the log
level before making any other calls if you want to see what it's up to.
### Using a temp log file
JWW conveniently creates a temporary file and sets the log Handle to
a io.Writer created for it. You should call this early in your application
initialization routine as it will only log calls made after it is executed.
When this option is used, the library will fmt.Println where to find the
log file.
```go
import (
jww "github.com/spf13/jwalterweatherman"
)
jww.UseTempLogFile("YourAppName")
```
### Setting a log file
JWW can log to any file you provide a path to (provided its writable).
Will only append to this file.
JWW can log to any `io.Writer`:
```go
import (
jww "github.com/spf13/jwalterweatherman"
)
jww.SetLogFile("/path/to/logfile")
jww.SetLogOutput(customWriter)
```