bugfixing & add smbd_journald
[logparse.git] / logparse / interface.py
index bb63f50095c9d2a8f69c1221be43e4a37bf0271b..dcb077794d764a33886defbace43b8bc3abaa876 100644 (file)
@@ -195,6 +195,7 @@ def rotate():
     for if permissions are not automatically granted.
     """
 
+    logger = logging.getLogger(__name__)
     try:
         if not os.geteuid() == 0:
             if stdin.isatty():
@@ -216,6 +217,7 @@ def rotate_sim():   # Simulate log rotation
     privileges, but permission errors will be shown in the output without it.
     """
 
+    logger = logging.getLogger(__name__)
     try:
         if not os.geteuid() == 0:
             logger.warning("Cannot run logrotate as root - you will see permission errors in the output below")