ray.serve.schema.LoggingConfig#
- class ray.serve.schema.LoggingConfig(*, encoding: str | EncodingType = None, log_level: int | str = 'INFO', logs_dir: str | None = None, enable_access_log: bool = True)[source]#
Bases:
BaseModel
Logging config schema for configuring serve components logs.
Example
from ray import serve from ray.serve.schema import LoggingConfig # Set log level for the deployment. @serve.deployment(LoggingConfig(log_level="DEBUG")) class MyDeployment: def __call__(self) -> str: return "Hello world!" # Set log directory for the deployment. @serve.deployment(LoggingConfig(logs_dir="/my_dir")) class MyDeployment: def __call__(self) -> str: return "Hello world!"
PublicAPI (alpha): This API is in alpha and may change before becoming stable.
Methods
Create a new model by parsing and validating input data from keyword arguments.
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Duplicate a model, optionally choose which fields to include, exclude and change.
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
Generate a JSON representation of the model,
include
andexclude
arguments as perdict()
.Try to update ForwardRefs on fields based on this Model, globalns and localns.
Attributes