Skip to content

Commit 8087888

Browse files
committed
Fix syslog extension
1 parent 447bcf4 commit 8087888

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

radish/extensions/syslog_writer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def log(self, message):
5252
5353
:param string message: the message to log
5454
"""
55+
import syslog
56+
5557
try:
5658
if isinstance(message, unicode):
5759
message = message.encode("utf8")
@@ -64,13 +66,17 @@ def syslog_writer_before_all(self, features, marker): # pylint: disable=unused-
6466
"""
6567
Opens the syslog
6668
"""
69+
import syslog
70+
6771
syslog.openlog("radish")
6872
self.log(u"begin run {0}".format(marker))
6973

7074
def syslog_writer_after_all(self, features, marker): # pylint: disable=unused-argument
7175
"""
7276
Closes the syslog
7377
"""
78+
import syslog
79+
7480
self.log(u"end run {0}".format(marker))
7581
syslog.closelog()
7682

0 commit comments

Comments
 (0)