diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-07-03 09:58:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-03 09:58:28 -0700 |
commit | 83a3ac089cff0d05559e6ba5c2c60b09f5cae176 (patch) | |
tree | 51cc53c0a77cf455cf9d700a453b6d57f1604fdb /plugin/plugintest | |
parent | 3848cb7e79e019e2f0878d6e2377ad36b3c7ca43 (diff) | |
download | chat-83a3ac089cff0d05559e6ba5c2c60b09f5cae176.tar.gz chat-83a3ac089cff0d05559e6ba5c2c60b09f5cae176.tar.bz2 chat-83a3ac089cff0d05559e6ba5c2c60b09f5cae176.zip |
MM-11029 Adding plugin logging functionality. (#9034)
* Capturing stdout, stderr of plugins in logs.
* Cleanup go-plugin debug logs.
* Adding logging to plugin API
* Generating mocks.
* godoc convention
Diffstat (limited to 'plugin/plugintest')
-rw-r--r-- | plugin/plugintest/api.go | 34 | ||||
-rw-r--r-- | plugin/plugintest/hooks.go | 2 |
2 files changed, 34 insertions, 2 deletions
diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index 145fcbf9d..b9d8d7521 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0 +// Code generated by mockery v1.0.0. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. @@ -563,6 +563,38 @@ func (_m *API) LoadPluginConfiguration(dest interface{}) error { return r0 } +// LogDebug provides a mock function with given fields: msg, keyValuePairs +func (_m *API) LogDebug(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// LogError provides a mock function with given fields: msg, keyValuePairs +func (_m *API) LogError(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// LogInfo provides a mock function with given fields: msg, keyValuePairs +func (_m *API) LogInfo(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + +// LogWarn provides a mock function with given fields: msg, keyValuePairs +func (_m *API) LogWarn(msg string, keyValuePairs ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keyValuePairs...) + _m.Called(_ca...) +} + // PublishWebSocketEvent provides a mock function with given fields: event, payload, broadcast func (_m *API) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) { _m.Called(event, payload, broadcast) diff --git a/plugin/plugintest/hooks.go b/plugin/plugintest/hooks.go index 0d335a626..790a5a993 100644 --- a/plugin/plugintest/hooks.go +++ b/plugin/plugintest/hooks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v1.0.0 +// Code generated by mockery v1.0.0. DO NOT EDIT. // Regenerate this file using `make plugin-mocks`. |