Skip to content

Commit

Permalink
Add basic logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravjuvekar committed Aug 7, 2022
1 parent c5a17bb commit 85d4895
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/remote_email_filtering/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
Basic building blocks for doing stuff with a
:class:`~remote_email_filtering.message.Message`
"""

import abc
import logging

log = logging.getLogger(__name__)


class Action(abc.ABC):
Expand Down Expand Up @@ -49,5 +51,6 @@ def __init__(self, destination: tuple[str]):
self.destination = destination

def __call__(self, msg):
log.info(f'Moving {msg.dir_}/{msg.Subject} to {target_dir}')
self.remote.move_message(msg, self.destination)
return []
11 changes: 8 additions & 3 deletions src/remote_email_filtering/remote.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import abc
import imapclient
import logging
import typing

from . import types
from . import message
import imapclient

from . import message, types

log = logging.getLogger(__name__)

imapclient.imaplib.Debug = 0


class Remote(abc.ABC):
Expand Down
2 changes: 1 addition & 1 deletion src/remote_email_filtering/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
import collections
import re
import typing


Expand Down

0 comments on commit 85d4895

Please sign in to comment.