class_docstr: Logging config schema for configuring serve components logs.
  
  Example:
  
      .. code-block:: python
  
          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!"
class_docstr_tok: ["Logging","config","schema","for","configuring","serve","components","logs",".","Example",":","..","code-block",":",":","python","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","!","''"]
code: def valid_log_level(cls, v):
      if isinstance(v, int):
          if v not in logging._levelToName:
              raise ValueError(
                  f'Got "{v}" for log_level. log_level must be one of '
                  f"{list(logging._levelToName.keys())}."
              )
          return logging._levelToName[v]
  
      if v not in logging._nameToLevel:
          raise ValueError(
              f'Got "{v}" for log_level. log_level must be one of '
              f"{list(logging._nameToLevel.keys())}."
          )
      return v
  
imports: import logging
  from collections import Counter
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import Any, Dict, List, Optional, Set, Union
  from zlib import crc32
  from ray._private.pydantic_compat import BaseModel, Extra, Field, root_validator, validator
  from ray._private.runtime_env.packaging import parse_uri
  from ray.serve._private.common import ApplicationStatus, DeploymentStatus, DeploymentStatusTrigger, ProxyStatus, ReplicaState, ServeDeployMode
  from ray.serve._private.constants import DEFAULT_GRPC_PORT, DEFAULT_UVICORN_KEEP_ALIVE_TIMEOUT_S, SERVE_DEFAULT_APP_NAME
  from ray.serve._private.deployment_info import DeploymentInfo
  from ray.serve._private.utils import DEFAULT
  from ray.serve.config import ProxyLocation
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 2 for calling the LoggingConfig obj's underlying member method code with example usage: obj.valid_log_level(cls, v) and returns: v, logging