B 劇c\ @sddlZddlmZddlmZdZdZdaddZdej dfd d Z d d Z d dZ ddZ GdddejZededS)N)_warn_deprecated_python)SessionzAmazon Web Servicesz1.26.19cKstf|adS)z Set up a default session, passing through any parameters to the session constructor. There is no need to call this unless you wish to pass custom parameters, because a default session will be created for you. N)rDEFAULT_SESSION)kwargsri/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/boto3/__init__.pysetup_default_sessionsrZboto3cCsT|dkr d}t|}||t}||t|}||||dS)a Add a stream handler for the given name and level to the logging module. By default, this logs all boto3 messages to ``stdout``. >>> import boto3 >>> boto3.set_stream_logger('boto3.resources', logging.INFO) For debugging purposes a good choice is to set the stream logger to ``''`` which is equivalent to saying "log everything". .. WARNING:: Be aware that when logging anything from ``'botocore'`` the full wire trace will appear in your logs. If your payloads contain sensitive data this should not be used in production. :type name: string :param name: Log name :type level: int :param level: Logging level, e.g. ``logging.INFO`` :type format_string: str :param format_string: Log message format Nz0%(asctime)s %(name)s [%(levelname)s] %(message)s)logging getLoggersetLevel StreamHandler Formatter setFormatter addHandler)namelevel format_stringloggerhandler formatterrrrset_stream_logger%s     rcCstdkrtttS)z Get the default session, creating one if needed. :rtype: :py:class:`~boto3.session.Session` :return: The default session N)rrrrrrr_get_default_sessionHsrcOstj||S)z Create a low-level service client by name using the default session. See :py:meth:`boto3.session.Session.client`. )rclient)argsrrrrrVsrcOstj||S)z Create a resource service client by name using the default session. See :py:meth:`boto3.session.Session.resource`. )rresource)rrrrrr_src@seZdZddZdS) NullHandlercCsdS)Nr)selfrecordrrremitkszNullHandler.emitN)__name__ __module__ __qualname__rrrrrrjsr)r Z boto3.compatrZ boto3.sessionr __author__ __version__rrDEBUGrrrrHandlerrr rrrrrs   #