Skip to content

Commit

Permalink
Merge pull request #502 from fomars/develop
Browse files Browse the repository at this point in the history
telegraf logging fix
  • Loading branch information
fomars committed Jan 30, 2018
2 parents f133ae0 + fafa188 commit 41ed906
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions yandextank/plugins/Telegraf/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ def install(self):
exc_info=True)
return None, None, None
if errors:
logging.error("[%s] error: '%s'", self.host, errors)
logger.error("[%s] error: '%s'", self.host, errors)
return None, None, None

if err_code:
logging.error(
logger.error(
"Failed to create remote dir via SSH at %s@%s, code %s: %s" %
(self.username, self.host, err_code, out.strip()))
return None, None, None
Expand Down Expand Up @@ -256,7 +256,7 @@ def install(self):
exc_info=True)
else:
if err:
logging.error("[%s] error: '%s'", self.host, errors)
logger.error("[%s] error: '%s'", self.host, errors)
if out.strip():
remote_telegraf_exists = out.strip()

Expand Down Expand Up @@ -322,7 +322,7 @@ def start(self):
telegraf_path=self.path['TELEGRAF_REMOTE_PATH'],
host=self.host,
kill_old=self.kill_old)
logging.debug('Command to start agent: %s', command)
logger.debug('Command to start agent: %s', command)
self.session = self.ssh.async_session(command)
self.reader_thread = threading.Thread(target=self.read_buffer)
self.reader_thread.setDaemon(True)
Expand Down Expand Up @@ -384,7 +384,7 @@ def _kill_agent(self):
self.agent_remote_folder)
out, errors, err_code = self.ssh.execute(cmd)
if errors:
logging.error(
logger.error(
"[%s] error while killing agent: '%s'",
self.host,
errors)

0 comments on commit 41ed906

Please sign in to comment.