OiPP dZddlZddlZejdZejejkreejdZ e Z dZ Gdde ZGdd e Zd d ZGd d e ZdS)aLogging control and utilities. Control of logging for SA can be performed from the regular python logging module. The regular dotted module namespace is used, starting at 'sqlalchemy'. For class-level logging, the class name is appended. The "echo" keyword parameter, available on SQLA :class:`_engine.Engine` and :class:`_pool.Pool` objects, corresponds to a logger specific to that instance only. N sqlalchemyctjtj}|tjd||dS)Nz.%(asctime)s %(levelname)s %(name)s %(message)s)logging StreamHandlersysstdout setFormatter Formatter addHandler)loggerhandlers /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/sqlalchemy/log.py_add_default_handlerr!sW#CJ//G JKK gctj|jdz|jzfd|_fd|_|_t||S)N.cBtjSN) isEnabledForrDEBUGselfr s rzclass_logger...s)<)./s(;(;GL(I(Ir) r getLogger __module____name___should_log_debug_should_log_infor _logged_classesadd)clsr s @r class_loggerr$,sc  s~3clB C CFKKKKCIIIICCJ JrceZdZdZdZdZdS) IdentifiedNcJ|jtjSr)r rrrrs rrzIdentified._should_log_debug8s{'' 666rcJ|jtjSr)r rrrr(s rr zIdentified._should_log_info;s{'' 555r)rr __qualname__ logging_namerr rrr&r&5s7L77766666rr&ceZdZdZejejejejdZdZ dZ dZ dZ e Z dZdZd Zd Zd Zd Zd S)InstanceLoggeraA logger adapter (wrapper) for :class:`.Identified` subclasses. This allows multiple instances (e.g. Engine or Pool instances) to share a logger, but have its verbosity controlled on a per-instance basis. The basic functionality is to return a logging level which is based on an instance's echo setting. Default implementation is: 'debug' -> logging.DEBUG True -> logging.INFO False -> Effective level of underlying logger ( logging.WARNING by default) None -> same as False )NFTdebugc||_tj||_|j|tjkr"|jjst|jdSdSdSr)echorrr _echo_maprhandlersr)rr1names r__init__zInstanceLogger.__init__Zs_ '--  >$ 7< / / 8L /  - - - - - 0 / / /rc>|jtj|g|Ri|dS)z/Delegate a debug call to the underlying logger.N)logrrrmsgargskwargss rr/zInstanceLogger.debugfs0 5d555f55555rc>|jtj|g|Ri|dS)z/Delegate an info call to the underlying logger.N)r7rrr8s rinfozInstanceLogger.infoks0 s4T444V44444rc>|jtj|g|Ri|dS)z1Delegate a warning call to the underlying logger.N)r7rWARNINGr8s rwarningzInstanceLogger.warningps0 #777777777rc>|jtj|g|Ri|dS)zB Delegate an error call to the underlying logger. Nr7rERRORr8s rerrorzInstanceLogger.errorws0 5d555f55555rcHd|d<|jtj|g|Ri|dS)z4Delegate an exception call to the underlying logger.exc_infoNrBr8s r exceptionzInstanceLogger.exception}s:z5d555f55555rc>|jtj|g|Ri|dS)z2Delegate a critical call to the underlying logger.N)r7rCRITICALr8s rcriticalzInstanceLogger.criticals1 !3888888888rc|jjj|krdS|j|j}|t jkr|j}||kr|jj|||fi|dSdS)zDelegate a log call to the underlying logger. The level here is determined by the echo flag as well as that of the underlying logger, and logger._log() is called directly. N) r managerdisabler2r1rNOTSETgetEffectiveLevel_log)rlevelr9r:r;selected_levels rr7zInstanceLogger.logs ;  &% / / F 2 W^ + +![::< !rc(t||dS)N)r])r^)rr\values r__set__zecho_property.__set__s5111111rN)rrr*rWrcrfr,rrr`r`s9G""" 22222rr`r)rWrrr rootloggerrRrOsetLevelWARNrsetr!r$objectr&r.r^r`r,rrrls-   W | , ,  w~%% %%%#%%66666666lllllVlll^<22222F22222r