
    d                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SS	KJr  SS
KJr  SSKJr  \
R"                  \
R$                  " \
R&                  R(                  5       " S S\
R*                  5      5       5       r\
R$                  " \
R&                  R.                  5       " S S\5      5       r\
R$                  " \
R&                  R2                  5       " S S\5      5       rg)zStream-logs command.    )absolute_import)division)unicode_literals)cloudbuild_util)logs)base)flags)log)
properties)	resourcesc                   <    \ rS rSrSrSSS.rSr\S 5       rS r	Sr
g	)
Log   Stream the logs for a build.z
            To stream logs for in progress build `123-456-789`:

                $ {command} --stream `123-456-789`

            To display logs for a completed build `098-765-432`:

                $ {command} `098-765-432`
            )DESCRIPTIONEXAMPLESFc                 |    [         R                  " U 5        [         R                  " U SS9  U R                  SSSS9  g )Nz&The build whose logs shall be printed.)introz--streamzKIf a build is ongoing, stream the logs to stdout until the build completes.
store_true)helpaction)r	   AddRegionFlagAddBuildArgadd_argument)parsers    lib/surface/builds/log.pyArgsLog.Args1   s?    		f$LM
%	      c                    UR                   =(       dI    [        R                  R                  R                   R	                  5       =(       d    [
        R                  n[
        R                  " 5       n[
        R                  " 5       n[        R                  R                  UR                  [        R                  R                  R                  R                  US.SS9n[         R"                  " X4U R$                  5      nUR&                  (       aB  U R$                  (       d  [(        R*                  R-                  S5        UR/                  U5        gUR1                  U5        g)zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Some value that we want to have printed later.
)
projectsIdlocationsIdz$cloudbuild.projects.locations.builds)params
collectionz
gcloud builds log --stream only displays logs from Cloud Storage. To view logs from Cloud Logging, run:
gcloud beta builds log --stream
N)regionr   VALUESbuildsGetr   DEFAULT_REGIONGetClientInstanceGetMessagesModuler   REGISTRYParsebuildcoreproject	GetOrFailcb_logsCloudBuildClient_support_gclstreamr
   statusPrintStreamPrintLog)selfargsbuild_regionclientmessages	build_refloggers          r   RunLog.Run;   s	    	 	*##**..0	*))  ..0F002H""((

$++0088BB'
 : ) ;I %%f8I8IJF{{

%	& mmI OOIr    N)__name__
__module____qualname____firstlineno____doc__detailed_helpr4   staticmethodr   rA   __static_attributes__rC   r   r   r   r      s4     %3- , &r   r   c                       \ rS rSrSrSrSrg)LogBetad   r   TrC   NrD   rE   rF   rG   rH   r4   rK   rC   r   r   rM   rM   d   
    $,r   rM   c                       \ rS rSrSrSrSrg)LogAlphak   r   TrC   NrO   rC   r   r   rR   rR   k   rP   r   rR   N)rH   
__future__r   r   r   !googlecloudsdk.api_lib.cloudbuildr   r   r2   googlecloudsdk.callioper   !googlecloudsdk.command_lib.buildsr	   googlecloudsdk.corer
   r   r   UniverseCompatibleReleaseTracksReleaseTrackGACommandr   BETArM   ALPHArR   rC   r   r   <module>r`      s     &  ' = = ( 3 # * ) D%%(()A$,, A * AH D%%**+c  , D%%++,w  -r   