{"library":"mo-logs","title":"mo-logs","description":"Structured logging and exception handling library for Python, part of the mo-* family. Current version 8.703.26061. Provides structured logging with sensible defaults and a simple API. Release cadence is frequent and automated.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install mo-logs"],"cli":null},"imports":["from mo_logs import Log","from mo_logs import setup_logging","from mo_logs import Except"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mo_logs import Log, setup_logging\nfrom mo_logs import constants\n\n# Setup logging (call once at startup)\nsetup_logging()\n\n# Basic logging\nLog.note(\"This is a log message\")\nLog.note(\"Message with {field}\", field=\"value\")\n\n# Warning\nLog.warning(\"This is a warning\")\n\n# Error handling\nfrom mo_logs import Except\ntry:\n    raise ValueError(\"something went wrong\")\nexcept ValueError as e:\n    error = Except.wrap(e)\n    Log.error(\"An error occurred: {error}\", error=error)\n\n# Set constants (like DEBUG flag)\nconstants.set({\"DEBUG\": True})","lang":"python","description":"Basic setup and usage of mo-logs for structured logging.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}