3
 [ð]Í  ã               @   s4   d dl Z ddlT e jdedd� G dd„ deƒZdS )é    Né   )Ú*z—'werkzeug.contrib.profiler' has moved to'werkzeug.middleware.profiler'. This import is deprecated as ofversion 0.15 and will be removed in version 1.0.)Ú
stacklevelc               @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚMergeStreama  An object that redirects ``write`` calls to multiple streams.
    Use this to log to both ``sys.stdout`` and a file::

        f = open('profiler.log', 'w')
        stream = MergeStream(sys.stdout, f)
        profiler = ProfilerMiddleware(app, stream)

    .. deprecated:: 0.15
        Use the ``tee`` command in your terminal instead. This class
        will be removed in 1.0.
    c             G   s&   t jdtdd� |stdƒ‚|| _d S )Nz}'MergeStream' is deprecated as of version 0.15 and will be removed in version 1.0. Use your terminal's 'tee' command instead.r   )r   z"At least one stream must be given.)ÚwarningsÚwarnÚDeprecationWarningÚ	TypeErrorÚstreams)Úselfr
   © r   ú=/tmp/pip-build-w1as9q70/Werkzeug/werkzeug/contrib/profiler.pyÚ__init__   s    zMergeStream.__init__c             C   s   x| j D ]}|j|ƒ qW d S )N)r
   Úwrite)r   ÚdataÚstreamr   r   r   r   (   s    zMergeStream.writeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s   r   )r   Zmiddleware.profilerr   r   Úobjectr   r   r   r   r   Ú<module>   s   