{"id":23215,"library":"aiologger","title":"aiologger","description":"Asynchronous logging library for Python and asyncio. Version 0.7.0. Supports Python >=3.7. Provides an async-compatible logger that integrates with the standard logging module. Release cadence is low; last release was in 2021.","status":"active","version":"0.7.0","language":"python","source_language":"en","source_url":"https://github.com/b2wdigital/aiologger","tags":["logging","asyncio","async","json"],"install":[{"cmd":"pip install aiologger","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Logger","correct":"from aiologger import Logger"},{"note":"There is no AsyncLogger; use Logger or JsonLogger.","wrong":"from aiologger import AsyncLogger","symbol":"AsyncLogger","correct":"from aiologger.loggers.json import JsonLogger"},{"note":"","wrong":"","symbol":"JsonLogger","correct":"from aiologger.loggers.json import JsonLogger"}],"quickstart":{"code":"import asyncio\nfrom aiologger import Logger\n\nasync def main():\n    logger = Logger.with_default_handlers(name='my-app')\n    await logger.info('Hello, world!')\n    await logger.shutdown()\n\nasyncio.run(main())","lang":"python","description":"Basic async logging with default handlers. Always call shutdown to flush and close handlers."},"warnings":[{"fix":"Always use `await` when calling logger methods, or use `await logger.info(...)`.","message":"Logger is a coroutine-based object; you must await all logging methods (info, error, etc.) or use asyncio.run. Not awaiting will produce warnings or silently skip logs.","severity":"gotcha","affected_versions":"all"},{"fix":"Always call `await logger.shutdown()` at the end of your async block.","message":"Logger's handlers are not static; you must call `shutdown()` to flush and close handlers properly. Failure to do so may lose final log entries.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from aiologger import Logger` instead.","message":"The `aiologger.AsyncLogger` class is misdocumented; the correct logger is `aiologger.Logger`. Some older examples reference `AsyncLogger` which does not exist.","severity":"deprecated","affected_versions":"0.6.0 - 0.7.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure all aiologger calls happen within the same event loop, typically the main thread's loop. Create the logger inside async context.","cause":"Creating a Logger before the event loop is running, or mixing loops across threads/contexts.","error":"RuntimeError: Task <Task pending ...> got Future <Future pending ...> attached to a different loop"},{"fix":"Add `await`: `await logger.info(...)`","cause":"Trying to use `logger.info` as a synchronous call without `await`.","error":"TypeError: object dict can't be used in 'await' expression"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}