diff options
author | bricelalu <[email protected]> | 2021-04-03 16:26:48 +0200 |
---|---|---|
committer | bricelalu <[email protected]> | 2021-04-03 16:35:39 +0200 |
commit | 68a8cd78ba52f90ae263e970fbfa8920207e8b5d (patch) | |
tree | 2afa9a6e4da7bd0a26665b701cd5e94011eb059e /tests/plugins/logger/plugin.go | |
parent | 2feb852ce0a5d29f9ad9c5cb5329de3ce00e7955 (diff) |
test: [Logger] add test for raw mode
Signed-off-by: bricelalu <[email protected]>
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..38da7266 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 } |