Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with latest commit #6

Open
Olen opened this issue Mar 3, 2020 · 1 comment
Open

Error with latest commit #6

Olen opened this issue Mar 3, 2020 · 1 comment

Comments

@Olen
Copy link

Olen commented Mar 3, 2020

Seems like you changed a bit to much when converting from CamelCase.
Some "logging.Functions" were also renamed...

Quick patch to fix it:

--- duallog.py  2020-03-03 21:19:26.102004804 +0100
+++ /usr/local/lib/python3.7/dist-packages/duallog/duallog.py   2020-03-03 19:55:26.844999139 +0100
@@ -68,15 +68,15 @@
     file_name = os.path.join(dir, file_name)
 
     # Set up logging to the logfile.
-    file_handler = logging.handlers.Rotatingfile_handler(
-        file_name=file_name, max_bytes=max_bytes, backup_count=backup_count)
+    file_handler = logging.handlers.RotatingFileHandler(
+        filename=file_name, maxBytes=max_bytes, backupCount=backup_count)
     file_handler.setLevel(logging.DEBUG)
     file_formatter = logging.Formatter(file_msg_format)
     file_handler.setFormatter(file_formatter)
     logger.addHandler(file_handler)
 
     # Set up logging to the console.
-    stream_handler = logging.stream_handler()
+    stream_handler = logging.StreamHandler()
     stream_handler.setLevel(minLevel)
     stream_formatter = logging.Formatter(console_msg_format)
     stream_handler.setFormatter(stream_formatter)

Olen added a commit to Olen/duallog that referenced this issue Mar 3, 2020
@dmckim1977
Copy link

This fixes it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants