diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f0c93c1fe..febbc07dbf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ [#2430](https://github.com/Mashape/kong/pull/2430) - Logging retries and failure information. [#2429](https://github.com/Mashape/kong/pull/2429). +- Serf commands are now logged with a `DEBUG` log level. + [#2410](https://github.com/Mashape/kong/pull/2410) - Plugins: - :fireworks: **New Request termination plugin**. This plugin allows to temporarily disable an API and return a pre-configured response status and diff --git a/kong/serf.lua b/kong/serf.lua index bd0875f5882..a5ee90558d8 100644 --- a/kong/serf.lua +++ b/kong/serf.lua @@ -7,6 +7,9 @@ local pl_file = require "pl.file" local cjson = require "cjson.safe" local log = require "kong.cmd.utils.log" +local ngx_log = ngx.log +local DEBUG = ngx.DEBUG + local Serf = {} Serf.__index = Serf @@ -35,6 +38,7 @@ function Serf:invoke_signal(signal, args, no_rpc, full_error) end local rpc = no_rpc and "" or "-rpc-addr="..self.config.cluster_listen_rpc local cmd = string.format("%s %s %s %s", self.config.serf_path, signal, rpc, tostring(args)) + ngx_log(DEBUG, "[serf] running command: ", cmd) local ok, code, stdout, stderr = pl_utils.executeex(cmd) if not ok or code ~= 0 then local err = stderr