| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/logging/__pycache__/ |
Upload File : |
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ej G d� d ej � � � � Z
d
dd�e
_ d
S )z'logging write' command.� )�absolute_import)�division)�unicode_literals)�util)�base)�logc �6 � e Zd ZdZdZdZed� � � Zd� ZdS )�WritezWrite a log entry.) �DEFAULT�DEBUG�INFO�NOTICE�WARNING�ERROR�CRITICAL�ALERT� EMERGENCY)�text�jsonc � � | � dd�� � | � dd�� � | � dt j dd� � � | � d
dt j dd
�� � t j | d� � dS )z Register flags for this command.�log_namez4Name of the log where the log entry will be written.)�help�messagezUMessage to put in the log entry. It can be JSON if you include `--payload-type=json`.z--payload-typer zType of the log entry payload.)�choices�defaultr z
--severityFr z Severity level of the log entry.)�requiredr r r zlog entries to writeN)�add_argumentr
�PAYLOAD_TYPE�
SEVERITY_ENUMr �
AddParentArgs)�parsers �lib/surface/logging/write.py�Argsz
Write.Args$ s� � � ���� (� � *� *� *� ���� F� � H� H� H� �����"�F�.� � 1� 1� 1� ����u��#�Y�
/� � 1� 1� 1�
��v�5�6�6�6�6�6� c �� �� t j � � �t �j j |j � � � � � }�� t j t j |� � |j � � ��
d�� � |�� � }|j dk rRt j |j
� � }�j � � � }�fd�|j D � � |_ ||_ n|j
|_ t j � � j � �� |g�� � � � t. j � d� � dS ) z�This 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.
�global)�type)�logName�resource�severityr c �f �� g | ]-}�j j � |j |j � � � ��.S ))�key�value)�LogEntry�JsonPayloadValue�AdditionalPropertyr, r- )�.0�
json_property�messagess �r"