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

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

Open
kotofos opened this issue Jun 29, 2022 · 0 comments

Comments

@kotofos
Copy link

kotofos commented Jun 29, 2022

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()
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

1 participant