fddlmZddlZddlZddlZddlZddlmZddlm Z m Z ddl m Z m Z ddlmZmZGddeej$ZGd d eej$ZGd d eej$Zd ZgdZgdZgdZgdZe e j6Zej:dZej:dZej:dZ ej:dZ!ejDdejDdejFdejHdejJdejLdejNdiZ(d#dZ)d$dZ*d#dZ+d%d Z,Gd!d"Z-y)&) annotationsN)Any)UuidRepresentation json_util) JSONOptions_truncate_documents)ConnectionCheckOutFailedReasonConnectionClosedReasonceZdZdZdZdZy)_CommandStatusMessagezCommand startedzCommand succeededzCommand failedN)__name__ __module__ __qualname__STARTED SUCCEEDEDFAILEDW/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/pymongo/logger.pyr r sG#I Frr ceZdZdZdZdZdZy)_ServerSelectionStatusMessagezServer selection startedzServer selection succeededzServer selection failedz/Waiting for suitable server to become availableN)r rrrrrWAITINGrrrrr!s(G,I &F?Grrc8eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z y ) _ConnectionStatusMessagezConnection pool createdzConnection pool readyzConnection pool closedzConnection pool clearedzConnection createdzConnection readyzConnection closedzConnection checkout startedzConnection checked outzConnection checkout failedzConnection checked inN)r rr POOL_CREATED POOL_READY POOL_CLOSED POOL_CLEARED CONN_CREATED CONN_READY CONN_CLOSEDCHECKOUT_STARTEDCHECKOUT_SUCCEEDEDCHECKOUT_FAILED CHECKEDINrrrrr(s;,L(J*K,L'L#J%K412O'Irr) authenticate saslStart saslContinuegetnonce createUser updateUsercopydbgetnoncecopydbsaslstartcopydb)helloismasterisMaster)codecodeName errorLabels)commandreplyfailure)uuid_representationzpymongo.commandzpymongo.connectionzpymongo.serverSelectionzpymongo.clientzConnection pool was closedzConnection pool was stalez,An error occurred while using the connectionzs r _info_logrJ_s KK $V$%rc|jtjr|j|yt j |t dy)N) stacklevel) isEnabledForloggingINFOrIwarningswarn UserWarning)r?messages r _log_or_warnrUcs2 7<<( G  g{q9rc0eZdZdZddZddZd dZd dZy) r=_kwargs _redactedc  ||_d|_y)NFrW)selfkwargss r__init__zLogMessage.__init__ns rcv|jdtj|jtdzS)Nz%sc"|jSrC__repr__os rz$LogMessage.__str__..vs AJJLr json_optionsdefault)_redactrdumpsrX _JSON_OPTIONS)r[s r__str__zLogMessage.__str__rs0  OO =BX   rc|jjddxsd|j|v}d|jvxr|jdtv}|jdtvxr|}|xs|S)Nspeculative_authenticateFspeculativeAuthenticate commandName)rXpop_SENSITIVE_COMMANDS_HELLO_COMMANDS)r[doc_nameis_speculative_authenticateis_sensitive_commandis_sensitive_hellos r _is_sensitivezLogMessage._is_sensitivezs LL  7 ? C(DLL,BB $ T\\ ) `dll=.IM`.`  LL '? : Z?Z $9'99rc@|jry|jjDcic] \}}| || c}}|_d|jvrFt|jddr-|jdj dz|jd<d|jvr%t |jd|jd<t tjdt}|dkrt}|jjdd}tD]}|jj|}|s!|d k(r.|r,|jDcic]\}}|tvs||}}}|d k7r'|j|rtj i}n,t#||d}tj |t$d }t'||kDr&|j)d|j+d d dz}||j|<d|_ycc}}wcc}}w)N durationMS total_secondsr& serviceIdMONGOB_LOG_MAX_DOCUMENT_LENGTHrisServerSideErrorFr8c"|jSrCr`rbs rrdz$LogMessage._redact..s !**,rrezunicode-escapeignorez...T)rYrXitemshasattrrzstrintosgetenv_DEFAULT_DOCUMENT_LENGTHrp_DOCUMENT_NAMESrE_REDACTED_FAILURE_FIELDSrwrrirrjlenencodedecode)r[kvdocument_lengthis_server_side_errorrsdoc truncated_docs rrhzLogMessage._redacts >> )-););)=OA1O 4<< 'GDLL4NP_,`)-l)C)Q)Q)SVZ)ZDLL & $,, &(+DLL,E(FDLL %bii(HJbcd Q 6O#||//0CUK'H,,""8,Cy(-A,/IIKYDAq1@X;X1a4YCYy(T-?-?-I#//"-C$7_$Ma$PM#//%%2 6C s8o- %5o6==>NPXYC*- X&%(&;PZs HHH'HN)r\r)returnr)rsrrbool)rNone)r rr __slots__r]rkrwrhrrrr=r=ks(I  : rr=)r?logging.Loggerr@rrr)rFrrr)r?rrTrrr). __future__renumrOrrQtypingrbsonrrbson.json_utilrrpymongo.monitoringr r rEnumr rrrrqrrrrSTANDARDrj getLogger_COMMAND_LOGGER_CONNECTION_LOGGER_SERVER_SELECTION_LOGGER_CLIENT_LOGGERrSTALEERROR CONN_ERRORIDLETIMEOUTrDrArGrJrUr=rrrrsV#  .;UC @C@ (sDII (   4>10B0K0KL #'##$56&W&&';<,7,,-FG"""#34&&(D"..0L  "=  "P"--/m!?"**,W%!'A&:>>r