add logging
This commit is contained in:
parent
02efb009a8
commit
cd0682d34c
@ -139,6 +139,7 @@ def delete_messages(delete_ids):
|
|||||||
|
|
||||||
async def new_session(stream_reader: asyncio.StreamReader, stream_writer: asyncio.StreamWriter):
|
async def new_session(stream_reader: asyncio.StreamReader, stream_writer: asyncio.StreamWriter):
|
||||||
if WAIT_FOR_PRIVILEGES_TO_DROP:
|
if WAIT_FOR_PRIVILEGES_TO_DROP:
|
||||||
|
logging.warning("Waiting for privileges to drop")
|
||||||
await WAIT_FOR_PRIVILEGES_TO_DROP
|
await WAIT_FOR_PRIVILEGES_TO_DROP
|
||||||
reader.set(stream_reader)
|
reader.set(stream_reader)
|
||||||
writer.set(stream_writer)
|
writer.set(stream_writer)
|
||||||
@ -160,6 +161,8 @@ async def new_session(stream_reader: asyncio.StreamReader, stream_writer: asynci
|
|||||||
|
|
||||||
|
|
||||||
async def a_main(dirpath: Path, port: int, host="", context: ssl.SSLContext = None, waiter=None):
|
async def a_main(dirpath: Path, port: int, host="", context: ssl.SSLContext = None, waiter=None):
|
||||||
|
logging.info(
|
||||||
|
f"Starting POP3 server Maildir={dirpath}, host={host}, port={port}, context={context}, waiter={waiter}")
|
||||||
global MAILS_PATH, WAIT_FOR_PRIVILEGES_TO_DROP
|
global MAILS_PATH, WAIT_FOR_PRIVILEGES_TO_DROP
|
||||||
MAILS_PATH = dirpath / 'new'
|
MAILS_PATH = dirpath / 'new'
|
||||||
WAIT_FOR_PRIVILEGES_TO_DROP = waiter
|
WAIT_FOR_PRIVILEGES_TO_DROP = waiter
|
||||||
|
Loading…
Reference in New Issue
Block a user