Skip to content

Commit

Permalink
User LoggerProto and remove Annotated
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed May 24, 2024
1 parent 64b0704 commit 36c1469
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions faststream/confluent/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ssl import SSLContext
from time import time
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Expand All @@ -17,11 +18,13 @@
from confluent_kafka import Consumer, KafkaError, KafkaException, Message, Producer
from confluent_kafka.admin import AdminClient, NewTopic
from pydantic import BaseModel
from typing_extensions import Annotated, Doc

from faststream.log import logger
from faststream.utils.functions import call_or_await

if TYPE_CHECKING:
from faststream.types import LoggerProto

_missing = object()


Expand Down Expand Up @@ -107,10 +110,7 @@ def __init__(
sasl_kerberos_service_name: str = "kafka",
sasl_kerberos_domain_name: Optional[str] = None,
sasl_oauth_token_provider: Optional[str] = None,
logger: Annotated[
Union[logging.Logger, None, object],
Doc("User specified logger to pass into Context and log service messages."),
] = logger,
logger: Optional[Union["LoggerProto", logging.Logger]] = logger,
) -> None:
self.logger = logger
if isinstance(bootstrap_servers, Iterable) and not isinstance(
Expand Down Expand Up @@ -302,10 +302,7 @@ def __init__(
sasl_kerberos_service_name: str = "kafka",
sasl_kerberos_domain_name: Optional[str] = None,
sasl_oauth_token_provider: Optional[str] = None,
logger: Annotated[
Union[logging.Logger, None, object],
Doc("User specified logger to pass into Context and log service messages."),
] = logger,
logger: Optional[Union["LoggerProto", logging.Logger]] = logger,
) -> None:
self.logger = logger
if group_id is None:
Expand Down

0 comments on commit 36c1469

Please sign in to comment.