Utilities¶
Helper functions for logging, context access, and URL handling.
Logging Initialisation¶
logging_init(cfg_path=None)
¶
Source code in ivcap_lambda/logger.py
Context Helpers¶
These helpers let you access the current job's context from anywhere in your code — useful in helper functions that don't have direct access to JobContext.
get_event_reporter()
¶
get_job_id()
¶
URL Utilities¶
get_public_url_prefix(req)
¶
Return the public url prefix for req.
First checks for a Forwarded http header and if
absent uses the request's base_ur; variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
req
|
Request
|
A FastAPI request instance |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A url as string |