Skip to content

Commit c9bcdc5

Browse files
authored
Merge pull request #11 for 0.7.1 Release
2 parents e8fbaf7 + 352ba17 commit c9bcdc5

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<h2 align="center">Logger by aah framework</h2>
44
</p>
55
<p align="center">
6-
<p align="center"><a href="https://travis-ci.org/go-aah/log"><img src="https://travis-ci.org/go-aah/log.svg?branch=master" alt="Build Status"></a> <a href="https://codecov.io/gh/go-aah/log/branch/master"><img src="https://codecov.io/gh/go-aah/log/branch/master/graph/badge.svg" alt="Code Coverage"></a> <a href="https://goreportcard.com/report/aahframework.org/log.v0"><img src="https://goreportcard.com/badge/aahframework.org/log.v0" alt="Go Report Card"></a> <a href="https://github.com/go-aah/log/releases/latest"><img src="https://img.shields.io/badge/version-0.7.0-blue.svg" alt="Release Version"></a> <a href="https://godoc.org/aahframework.org/log.v0"><img src="https://godoc.org/aahframework.org/log.v0?status.svg" alt="Godoc"></a> <a href="https://twitter.com/aahframework"><img src="https://img.shields.io/badge/twitter-@aahframework-55acee.svg" alt="Twitter @aahframework"></a></p>
6+
<p align="center"><a href="https://travis-ci.org/go-aah/log"><img src="https://travis-ci.org/go-aah/log.svg?branch=master" alt="Build Status"></a> <a href="https://codecov.io/gh/go-aah/log/branch/master"><img src="https://codecov.io/gh/go-aah/log/branch/master/graph/badge.svg" alt="Code Coverage"></a> <a href="https://goreportcard.com/report/aahframework.org/log.v0"><img src="https://goreportcard.com/badge/aahframework.org/log.v0" alt="Go Report Card"></a> <a href="https://github.com/go-aah/log/releases/latest"><img src="https://img.shields.io/badge/version-0.7.1-blue.svg" alt="Release Version"></a> <a href="https://godoc.org/aahframework.org/log.v0"><img src="https://godoc.org/aahframework.org/log.v0?status.svg" alt="Godoc"></a> <a href="https://twitter.com/aahframework"><img src="https://img.shields.io/badge/twitter-@aahframework-55acee.svg" alt="Twitter @aahframework"></a></p>
77
</p>
88

99
aah logger is simple and provides capabilities to fulfill application use cases.
1010

1111
### News
1212

13-
* `v0.7.0` [released](https://github.com/go-aah/log/releases/latest) and tagged on Jun 24, 2018.
13+
* `v0.7.1` [released](https://github.com/go-aah/log/releases/latest) and tagged on Jul 22, 2018.
1414

1515
## Installation
1616

console_receiver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type ConsoleReceiver struct {
4040
flags []ess.FmtFlagPart
4141
isCallerInfo bool
4242
isColor bool
43-
mu *sync.Mutex
43+
mu sync.Mutex
4444
}
4545

4646
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
@@ -61,7 +61,7 @@ func (c *ConsoleReceiver) Init(cfg *config.Config) error {
6161
return fmt.Errorf("log: unsupported format '%s'", c.formatter)
6262
}
6363

64-
c.mu = &sync.Mutex{}
64+
c.mu = sync.Mutex{}
6565

6666
return nil
6767
}

entry.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,17 @@ type Fields map[string]interface{}
2626
// Entry represents a log entry and contains the timestamp when the entry
2727
// was created, level, etc.
2828
type Entry struct {
29+
Level level `json:"-"`
30+
Line int `json:"line,omitempty"`
2931
AppName string `json:"app_name,omitempty"`
3032
InstanceName string `json:"instance_name,omitempty"`
3133
RequestID string `json:"request_id,omitempty"`
3234
Principal string `json:"principal,omitempty"`
33-
Level level `json:"-"`
34-
Time time.Time `json:"-"`
3535
Message string `json:"message,omitempty"`
3636
File string `json:"file,omitempty"`
37-
Line int `json:"line,omitempty"`
3837
Fields Fields `json:"fields,omitempty"`
39-
40-
logger *Logger
38+
Time time.Time `json:"-"`
39+
logger *Logger
4140
}
4241

4342
//‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
@@ -47,7 +46,7 @@ type Entry struct {
4746
// MarshalJSON method for formating entry to JSON.
4847
func (e *Entry) MarshalJSON() ([]byte, error) {
4948
type alias Entry
50-
ne := &struct {
49+
ne := struct {
5150
Level string `json:"level,omitempty"`
5251
Time string `json:"timestamp,omitempty"`
5352
*alias

file_receiver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type FileReceiver struct {
3434
flags []ess.FmtFlagPart
3535
isCallerInfo bool
3636
stats *receiverStats
37-
mu *sync.Mutex
37+
mu sync.Mutex
3838
isClosed bool
3939
rotatePolicy string
4040
openDay int
@@ -85,7 +85,7 @@ func (f *FileReceiver) Init(cfg *config.Config) error {
8585
f.maxSize = maxSize
8686
}
8787

88-
f.mu = &sync.Mutex{}
88+
f.mu = sync.Mutex{}
8989

9090
return nil
9191
}

version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
package log
66

77
// Version no. of aahframework.org/log library
8-
const Version = "0.7.0"
8+
const Version = "0.7.1"

0 commit comments

Comments
 (0)