Merge pull request #127 from noxiouz/fix_datarace_GetLevel
[Race] Fix datarace in GetLevel
diff --git a/README.md b/README.md
index ef6501f..e755e7c 100644
--- a/README.md
+++ b/README.md
@@ -242,6 +242,9 @@
* [`github.com/johntdyer/slackrus`](https://github.com/johntdyer/slackrus)
Hook for Slack chat.
+* [`github.com/wercker/journalhook`](https://github.com/wercker/journalhook).
+ Hook for logging to `systemd-journald`.
+
#### Level logging
Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
diff --git a/text_formatter.go b/text_formatter.go
index 78e7889..4e51734 100644
--- a/text_formatter.go
+++ b/text_formatter.go
@@ -43,7 +43,7 @@
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
- var keys []string
+ var keys []string = make([]string, 0, len(entry.Data))
for k := range entry.Data {
keys = append(keys, k)
}