Write a log entry to the server logs Args: level: Log level message: Log message service: Service name for the log entry extra: Additional metadata for the log entry extra_headers: Send extra headers extra_query: Add
(
self,
*,
level: Literal["debug", "info", "error", "warn"],
message: str,
service: str,
extra: Dict[str, object] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
)
| 235 | ) |
| 236 | |
| 237 | async def log( |
| 238 | self, |
| 239 | *, |
| 240 | level: Literal["debug", "info", "error", "warn"], |
| 241 | message: str, |
| 242 | service: str, |
| 243 | extra: Dict[str, object] | NotGiven = NOT_GIVEN, |
| 244 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 245 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 246 | extra_headers: Headers | None = None, |
| 247 | extra_query: Query | None = None, |
| 248 | extra_body: Body | None = None, |
| 249 | timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 250 | ) -> AppLogResponse: |
| 251 | """ |
| 252 | Write a log entry to the server logs |
| 253 | |
| 254 | Args: |
| 255 | level: Log level |
| 256 | |
| 257 | message: Log message |
| 258 | |
| 259 | service: Service name for the log entry |
| 260 | |
| 261 | extra: Additional metadata for the log entry |
| 262 | |
| 263 | extra_headers: Send extra headers |
| 264 | |
| 265 | extra_query: Add additional query parameters to the request |
| 266 | |
| 267 | extra_body: Add additional JSON properties to the request |
| 268 | |
| 269 | timeout: Override the client-level default timeout for this request, in seconds |
| 270 | """ |
| 271 | return await self._post( |
| 272 | "/log", |
| 273 | body=await async_maybe_transform( |
| 274 | { |
| 275 | "level": level, |
| 276 | "message": message, |
| 277 | "service": service, |
| 278 | "extra": extra, |
| 279 | }, |
| 280 | app_log_params.AppLogParams, |
| 281 | ), |
| 282 | options=make_request_options( |
| 283 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 284 | ), |
| 285 | cast_to=AppLogResponse, |
| 286 | ) |
| 287 | |
| 288 | async def modes( |
| 289 | self, |
nothing calls this directly
no test coverage detected