Skip to content

Commit

Permalink
Merge pull request #177 from MinterTeam/dev
Browse files Browse the repository at this point in the history
v0.8.2
  • Loading branch information
danil-lashin authored Dec 10, 2018
2 parents 07e6401 + 9423d7a commit 0ab909b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.8.2
*Dec 10th, 2018*

BUG FIXES

- [log] Add json log format

## 0.8.1
*Dec 10th, 2018*

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.4"
services:
minter:
image: minterteam/minter:0.8.1
image: minterteam/minter:0.8.2
volumes:
- ~/.minter:/minter
ports:
Expand Down
18 changes: 14 additions & 4 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/MinterTeam/minter-go-node/config"
"github.com/tendermint/tendermint/libs/cli/flags"
"github.com/tendermint/tendermint/libs/log"
"io"
"os"
)

Expand All @@ -13,7 +14,7 @@ var (
)

func init() {
var l log.Logger
var dest io.Writer = os.Stdout

if cfg.LogPath != "stdout" {
file, err := os.OpenFile(cfg.LogPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
Expand All @@ -22,9 +23,18 @@ func init() {
panic(err)
}

l = log.NewTMLogger(file)
} else {
l = log.NewTMLogger(os.Stdout)
dest = file
}

var l log.Logger

switch cfg.LogFormat {
case config.LogFormatJSON:
l = log.NewTMJSONLogger(dest)
case config.LogFormatPlain:
l = log.NewTMLogger(dest)
default:
panic("unsupported log format")
}

l, err := flags.ParseLogLevel(cfg.LogLevel, l, "info")
Expand Down
4 changes: 2 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ package version
const (
Maj = "0"
Min = "8"
Fix = "1"
Fix = "2"
)

var (
// Must be a string because scripts like dist.sh read this file.
Version = "0.8.1"
Version = "0.8.2"

// GitCommit is the current HEAD set using ldflags.
GitCommit string
Expand Down

0 comments on commit 0ab909b

Please sign in to comment.