
                         f    d Z ddlmZ ddlmZ ddlmZ ddlmZ dZ G d dej                        Z	y	)
z!Wrapper for log-streaming binary.    )absolute_import)division)unicode_literals)binary_operationszCould not locate executable log-streaming on the system PATH. Please ensure gcloud log-streaming component is properly installed. See https://cloud.google.com/sdk/docs/components for more details.c                   2     e Zd ZdZ fdZ	 	 	 	 ddZ xZS )LogStreamingWrapperz4Binary operation wrapper for log-streaming commands.c                 @    t        t        | 
  dddt        idd| y )Nzlog-streamingMISSING_EXECT)binarycustom_errorsinstall_if_missing )superr   __init__MISSING_BINARY)selfkwargs	__class__s     /lib/googlecloudsdk/command_lib/run/streaming.pyr   zLogStreamingWrapper.__init__#   s0    	
t- %~6 	    c                     ~d|g}|r|j                  d|g       |r|j                  d|g       |r|j                  d|g       |S )Nz
-projectIdz-filterz-formatz-token)extend)r   
project_id
log_filter
log_formattokenr   	exec_argss          r   _ParseArgsForCommandz(LogStreamingWrapper._ParseArgsForCommand*   sY     	z*I	:./	:./%()r   )NNNN)__name__
__module____qualname____doc__r   r   __classcell__)r   s   @r   r   r       s    < r   r   N)
r"   
__future__r   r   r   &googlecloudsdk.command_lib.util.anthosr   r   StreamingBinaryBackedOperationr   r   r   r   <module>r'      s0    ( &  ' D"+JJ r   