From 63a7a0349819b4ee1675fa45f42453edf12f10f0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 12 Dec 2014 18:50:55 -0800 Subject: [PATCH 1/3] Unix: log shell and call commands at INFO (Closes ProgVal/Limnoria#929) --- plugins/Unix/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index b0c614a98..da0c161e4 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -395,6 +395,8 @@ class Unix(callbacks.Plugin): you don't run anything that will spamify your channel or that will bring your machine to its knees. """ + self.log.info('Unix: running command "%s" for %s/%s' % (text, msg.nick, + irc.network)) args = shlex.split(text) try: with open(os.devnull) as null: @@ -425,6 +427,8 @@ class Unix(callbacks.Plugin): you don't run anything that will spamify your channel or that will bring your machine to its knees. """ + self.log.info('Unix: running command "%s" for %s/%s' % (text, msg.nick, + irc.network)) try: with open(os.devnull) as null: inst = subprocess.Popen(text, From d5b7a2768518848fc6b05ee955a08481fac4985d Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 13 Dec 2014 11:19:18 -0800 Subject: [PATCH 2/3] Unix: update logging --- plugins/Unix/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index da0c161e4..8244c4860 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -395,8 +395,8 @@ class Unix(callbacks.Plugin): you don't run anything that will spamify your channel or that will bring your machine to its knees. """ - self.log.info('Unix: running command "%s" for %s/%s' % (text, msg.nick, - irc.network)) + self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick, + irc.network) args = shlex.split(text) try: with open(os.devnull) as null: @@ -427,8 +427,8 @@ class Unix(callbacks.Plugin): you don't run anything that will spamify your channel or that will bring your machine to its knees. """ - self.log.info('Unix: running command "%s" for %s/%s' % (text, msg.nick, - irc.network)) + self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick, + irc.network) try: with open(os.devnull) as null: inst = subprocess.Popen(text, From a38ab5ea893f7b0bbe783437075b2c3df9f32c40 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 13 Dec 2014 11:21:18 -0800 Subject: [PATCH 3/3] Unix: Update logging again --- plugins/Unix/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Unix/plugin.py b/plugins/Unix/plugin.py index 8244c4860..1f0f6bd82 100644 --- a/plugins/Unix/plugin.py +++ b/plugins/Unix/plugin.py @@ -396,7 +396,7 @@ class Unix(callbacks.Plugin): will bring your machine to its knees. """ self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick, - irc.network) + irc.network) args = shlex.split(text) try: with open(os.devnull) as null: @@ -428,7 +428,7 @@ class Unix(callbacks.Plugin): will bring your machine to its knees. """ self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick, - irc.network) + irc.network) try: with open(os.devnull) as null: inst = subprocess.Popen(text,