aiologger icon indicating copy to clipboard operation
aiologger copied to clipboard

In docs same code in Lazy initialization and Using aiologger with the async/await syntax sections

Open kotofos opened this issue 3 years ago • 0 comments

In usage https://async-worker.github.io/aiologger/usage.html in Lazy initialization the code example exactly the same as in Using aiologger with the async/await syntax Probably it is mistake.

import asyncio
from aiologger import Logger


async def main():
    logger = Logger.with_default_handlers(name='my-logger')

    await logger.debug("debug at stdout")
    await logger.info("info at stdout")

    await logger.warning("warning at stderr")
    await logger.error("error at stderr")
    await logger.critical("critical at stderr")

    await logger.shutdown()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

kotofos avatar Jun 29 '22 12:06 kotofos