diff options
author | Valery Piashchynski <[email protected]> | 2021-04-04 20:48:40 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-04 20:48:40 +0300 |
commit | 899936387791bc4c73da5374484c3609b51981a2 (patch) | |
tree | ed9c1f087e68a2c70ac002466c233469563fc5e9 /tests/plugins/logger/plugin.go | |
parent | c1664e0815727e599dcb7f7a0a7a95a5be974197 (diff) | |
parent | c6b123af6464c3c6fd79bf1fc28da71c300eb7b3 (diff) |
Merge pull request #617 from bricelalu/feat-logger-add-clean-mode
feat(log): add "raw" mode
Diffstat (limited to 'tests/plugins/logger/plugin.go')
-rw-r--r-- | tests/plugins/logger/plugin.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/plugins/logger/plugin.go b/tests/plugins/logger/plugin.go index 9ddf9ec9..aa62f2b3 100644 --- a/tests/plugins/logger/plugin.go +++ b/tests/plugins/logger/plugin.go @@ -1,6 +1,8 @@ package logger import ( + "strings" + "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" @@ -28,6 +30,11 @@ func (p1 *Plugin) Serve() chan error { p1.log.Info("error", "test") p1.log.Debug("error", "test") p1.log.Warn("error", "test") + + // test the `raw` mode + messageJSON := []byte(`{"field": "value"}`) + p1.log.Debug(strings.TrimRight(string(messageJSON), " \n\t")) + return errCh } |