Python
Lyrelog for Python
No dependencies, and a handler for the logging module you already use: one line and every record, with its fields and its traceback, arrives as an event.
import lyrelog lyrelog.init( # a server key: it can append events, never read them api_key="lyr_srv_...", release="2.0.1", # goes to resource.app_version app_id="orders-api", )
Version 1.0.0. Python 3.11 or later. No dependencies.
What it does on Python
Start it and these come with it. Where the platform can't tell by itself, it's a call or a few lines, all in the guide.
- A call or a few linesCrashes and uncaught errorsA few lines of sys.excepthook: the SDK installs none
- On its ownSessionsPer process, a new one after 30 minutes without an event
- A call or a few linesEnvironment, told apartLYRELOG_ENVIRONMENT, else production
- A call or a few linesEvents wait when offlineIn memory, up to 10,000 events: flush in short scripts
- On its ownVerified eventsWith a server key
- On its ownYour existing loggingA logging handler, uvicorn and Django included
Python, in practice
What the guide says to keep in mind on this platform.
- Lambda and Cloud Functions call lyrelog.flush() before returning.
- The root logger stops at WARNING by default: set the level you want.
- A FastAPI middleware that records each request is in the guide.
- The Python guide
Same project, every platform
Your app, your website and your servers send to one project, and a person's events line up across all of them.
- SwiftiOS, iPadOS, macOS, tvOS, watchOS, visionOS
- AndroidKotlin and Java apps
- React NativeiOS and Android, New Architecture
- FlutteriOS and Android
- BrowsersJavaScript and TypeScript websites
- NodeServers, workers and functions
- GoServices and command-line tools
- JVMJava and Kotlin servers, Spring and Ktor
- All platforms
See it with your own app's events
Sign up with GitHub, Google or Apple. Your organization starts on Free; move it to Pro whenever you want.