§ Xׯdú‰ãó,—dZddlZddlmZmZmZmZmZddlZddlm Z m Z m Z m Z m Z ddlZddlmZmZmZmZmZmZddlmZddlmZmZddlmZmZmZmZm Z Gd „d ej!¦«Z"Gd „d e"¦«Z#Gd „de¦«Z$Gd„de¦«Z%dS)aÉ How to handle MySQL logs ************************* Among other things this module needs to establish: 1. Which of the logs (if any) are enabled. 2. Whether the output of the enabled logs are stored in a table or in a log file. Determining the state of the logs ----------------------------------- There are two possible scenarios: the server is down: In this case all logs are assumed to be **disabled** since the server won't be logging anything unless it's running. the server is up: Starting with MySQL Server 5.1.29 the relevant server variables changed. This derives in two new scenarios: server version < 5.1.29: :general query log: The state of this log is reflected in the server variable ``log`` which will be set to ``'OFF'`` if the log is disabled or to either ``'ON'`` or to ``'1'`` or to a file path if the log is enabled. :slow query log: Its state is reflected in the server variable ``log_slow_queries`` which will be set to ``'OFF'`` if the log is disabled or to ``'ON'`` or to ``'1'`` if the log is enabled. :error log: Its state is reflected in the server variable ``log_error`` which will be set to ``''`` (the empty string) if the log is disabled or to the path to the error log file if the log is enabled. .. note:: The error logs are not going to be written to the error log file if the server was started with the ``--console`` command line option on Windows, even if ``log_error`` has a path set up. In this case error logs are written to stderr. It seems that there's no way to query the server to determine if this ``--console`` option is in place. .. note:: The ``log_slow_queries`` and ``log`` variable were removed in MySQL Server 5.6. server version >= 5.1.29: :general query log: If enabled the ``general_log`` variable will be set to ``'ON'`` or to ``'1'``. Otherwise it will be set to ``'OFF'`` or to ``'0'``. :slow query log: If enabled the ``slow_query_log`` variable will be set to ``'ON'`` or to ``'1'``. Otherwise it will be set to ``'OFF'`` or to ``'0'``. :error log: Its state is reflected in the server variable ``log_error`` as explained for server version < 5.1.29. .. note:: For MySQL Server versions >= 5.1.6, if the variable ``log_output`` contains the value ``'NONE'``, the general query log and the slow query log will not record any new log entry. The general log can also be disabled by setting to ``'1'`` the session variable ``sql_log_off``. Determining where the logs are being written --------------------------------------------- Starting from MySQL Server 5.1.6 there's the possibility of sending the logs from the general query log or from the slow query log to a server table instead of to a log file. This is controlled by the value of the variable ``log_output`` which can be a combination of the values ``'FILE'`` (log into log files), ``'TABLE'`` (log into a server table) or ``'NONE'`` (don't log). If given, ``'NONE'`` takes precedence over the other values. .. warning:: For MySQL Server versions older than 5.1.29 there's no reliable way to know where the general and slow query logs are being written (if they are logged to a file). Their default values are ``$datadir + $hostname + '.log'`` and ``$datadir + $hostname + '-slow.log'``, respectively. This can be changed in the command line or in the configuration file and the real paths will not be exposed in any server variable. Starting from MySQL Server 5.1.29 the paths to the general and slow query log files are stored in the ``general_query_log_file`` and in the``slow_query_log_file`` variables, respectively. *The server creates the file in the data directory unless an absolute path name is given to specify a different directory.* Use cases for the server logs --------------------------------- 1. The server is running. All logs are enabled and WB can precisely determine their sources. Every log is shown in its corresponding tab. 2. The ``log_output`` server variable contains both ``'FILE'`` and ``'TABLE'``. WB will select on a per log basis which source should be chosen. Will select table logs if the server is local or if the server is remote and any of these happen: * Cannot reliably determine the paths to the log file. * The user running WB has no read permissions on the log file. * The log file does not exist. * The user explicitly requested to read from log table. 3. ``log_output`` contains ``'NONE'``. Nonetheless WB will check for log sources and will show them, alerting the user about log not being updated because of that. *What to do if there are log files and log tables available in this case?* 4. The server is logging to files and WB can precisely determine their paths but the log file is missing in the file system. The situation will be reported to the user (advising him to ``FLUSH LOGS`` or restart the server and start querying) The log will not be shown as long as this situation persists. 5. The server is logging to tables and the connection to the server is lost. If the server is also logging to files, and a log file exists in the file system, the log file will be shown and the user will be warned about this change. 6. The server is logging to files and WB cannot precisely determine the path to the log file (i.e. server version < 5.1.29). WB will try to get the path from these sources in this order: 1. The server's configuration file. 2. The default path assumed by the server when no log path is specified. If no such file is found in the file system the log will not be shown. 7. The user changed the source of a log or the path to a log file while WB was showing the previous source/path. WB will switch to the new source/path and will inform the user of the change. 8. [Postponed] The user clicks on a *Add new log* button. A dialog will be shown in which the user will select the type of log to be added (error, general or slow), the log source (a database table or a log file) and the name of the log table/file. A new tab showing the user selected log will be shown and will persist during the session or until the user clicks on the tab's *Close* button. éN)ÚnewBoxÚnewLabelÚ newTreeViewÚ newTabViewÚ newButton)ÚGeneralQueryLogReaderÚSlowQueryLogReaderÚGeneralLogFileReaderÚSlowLogFileReaderÚErrorLogFileReader)ÚLogFileAccessErrorÚ ServerIOErrorÚOperationCancelledErrorÚInvalidPasswordErrorÚlog_error_decoratorÚ to_unicode)ÚWorkerThreadHelper)Ú log_errorÚ log_debug)ÚWbAdminTabBaseÚWbAdminValidationConfigFileÚWbAdminValidationConnectionÚWbAdminValidationBaseÚWbAdminValidationRemoteAccessc󎇗eZdZdZˆfd„Zed„¦«Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z dd „Zd „Zd„Zd„Zd„Zd„Zd„ZˆxZS)ÚLogViewz| Main front end view class for displaying log entries. Each page in the Tab View is an instance of this class. cóN•—tt|¦« d¦«| ¦«| ¦«||_||_||_d|_d|_ d|_ d|_ d|_ |  ¦«d|_dS)z® The arguments following BackendLogReaderClass will be passed to BackendLogReaderClass to instantiate it in order to get a log reader object. FN)ÚsuperrÚ__init__Ú set_managedÚset_release_on_addÚownerÚBackendLogReaderClassÚargsÚ log_readerÚ error_boxÚtreeÚbboxÚ warning_boxÚ update_uiÚworker©Úselfr"r#r$Ú __class__s €ú..\modules\wb_admin_logs.pyrzLogView.__init__Âsœø€õ �g�tÑÔ×%Ò% eÑ,Ô,Ð,Ø ×ÒÑÔÐØ ×ÒÑ!Ô!Ð!؈Œ à%:ˆÔ"؈Œ àˆŒØˆŒØˆŒ ؈Œ ØˆÔØ �ŠÑÔÐàˆŒ ˆ ˆ ócó —|jr!| |j¦«d|_td¦«|_|j d¦«t t |¦«¦«}|j |dd¦«t¦«}| d¦«|j |dd¦«|  |j ¦«| |jdd¦«dS)NTéFz Try again) r&ÚremoverÚ set_spacingrÚstrÚaddrÚset_textÚadd_clicked_callbackÚ try_again)r-ÚerrorÚ error_labelÚtry_again_buttons r/Ú _show_errorzLogView._show_errorÚsä€à Œ>ð "Ø �KŠK˜œÑ 'Ô 'Ð 'Ø!ˆDŒNÝ ™œˆŒØ Œ×"Ò" 1Ñ%Ô%Ð%Ý�s 5™zœzÑ*Ô*ˆ Ø Œ×Ò˜;¨¨tÑ4Ô4Ð4Ý$™;œ;ÐØ×!Ò! +Ñ.Ô.Ð.Ø Œ×ÒÐ+¨U°DÑ9Ô9Ð9Ø×-Ò-¨d¬nÑ=Ô=Ð=Ø �Š�” ¨Ñ-Ô-Ð-Ð-Ð-r0cóV—| ¦«| ¦«dS©N)r*Úrefresh©r-s r/r9zLogView.try_againés#€Ø �ŠÑÔÐØ � Š ‰Œˆˆˆr0có—dSr?©rAs r/Úcreate_filter_boxzLogView.create_filter_boxíó€Ø ˆr0c óX—|jr!| |j¦«d|_|jr!| |j¦«d|_|jr!| |j¦«d|_|jr!| |j¦«d|_| d¦«| d¦«| ¦«}|r@| ¦«r| |¦«|  |dd¦« |j |j Ž|_ n\#t$rO}ddl}td|›d| ¦«›d�¦«| d|z¦«Yd}~dSd}~wwxYw|j jrt'd¦«|_|j d¦«t)|j j¦«}|j  |dd¦«|  |jdd¦«t+t,j¦«|_|j t,j¦«|j jD]5}|j t,j|d|dd¦«Œ6|j ¦«|  |jdd¦«t-j¦«}| d ¦«|  d ¦«| !d ¦«| "d ¦«|  t)d ¦«ddddt,j#¦«|j j$rd|j j$j%d kr0d |_&tOj(|j)¦«t)d¦«}n.t)|j j$j%¦«}nt)d¦«}| *t,j+¦«|  |dd ddt,j,t,j#zt,j-z¦«|  t)d¦«d dddt,j,t,j#z¦«t)|j j$rdnd¦«|_.|j. *t,j+¦«|  |j.dd ddt,j,t,j#zt,j-z¦«|  t)d¦«dddd t,j,t,j#z¦«t)d¦«|_/|j/ *t,j+¦«|  |j/dd dd t,j,t,j#z¦«|  |dd¦«t'd¦«|_|j d¦«| 0|jdd¦«t-j1¦«|_2|j2 3d|j4dd¦«|j2 3d|j5dd¦«|j 6|j2¦«|j  t)d¦«dd¦«to¦«|_8|j8 9d¦«|j  |j8dd¦«|j8 :|j;¦«to¦«|_<|j< 9d¦«|j  |j<dd¦«|j< :|j=¦«to¦«|_>|j> 9d¦«|j  |j>dd¦«|j> :|j?¦«to¦«|_@|j@ 9d¦«|j  |j@dd¦«|j@ :|jA¦«to¦«|_B|jB 9d¦«|j  |jBdd¦«|jB :|jC¦«|j j$r8|j j$j%d kr%d|_DtOjEd|j&¦«dSdSdS)Nr2FTrzException creating log reader: ú zError creating log reader: %s ééézLog File Location:Ústderra zWindows Event viewerÚTABLEzLog File Size:éz retrieving...ú-zShowing:zretrieving data...zCopy Rowz Copy Recordz Copy DetailsÚÚOldestz< Previous Pagez Next Page >z Most RecentÚRefresh)Fr&r3r'r(r)Ú set_paddingr4rDÚ get_parentr6r#r$r%Ú ExceptionÚ tracebackrÚ format_excr=Úpartial_supportrrrÚmformsÚ TreeFlatListÚset_selection_modeÚTreeSelectMultipleÚ column_specsÚ add_columnÚStringColumnTypeÚ end_columnsÚnewTableÚset_row_spacingÚset_column_spacingÚset_column_countÚ set_row_countÚ HFillFlagÚlog_fileÚpathÚqueryÚgrtÚsetEventlogCallbackÚ printResultsÚ set_styleÚ BoldStyleÚ VFillFlagÚ HExpandFlagÚ size_labelÚ range_labelÚadd_endÚnewContextMenuÚ_menuÚadd_item_with_titleÚ copy_recordÚ copy_detailsÚset_context_menurÚ bof_buttonr7r8Úgo_bofÚ back_buttonÚgo_backÚ next_buttonÚgo_nextÚ eof_buttonÚgo_eofÚrefresh_buttonr@Úactual_positionÚgetEventLogEntry)r-Ú filter_boxr:rUÚ warning_labelÚcolspecÚtableÚlabels r/r*zLogView.update_uiðs÷€Ø Œ>ð "Ø �KŠK˜œÑ 'Ô 'Ð 'Ø!ˆDŒNà Œ9ð Ø �KŠK˜œ Ñ "Ô "Ð "؈DŒIà Œ9ð Ø �KŠK˜œ Ñ "Ô "Ð "؈DŒIà Ô ð $Ø �KŠK˜Ô(Ñ )Ô )Ð )Ø#ˆDÔ à ×Ò˜ÑÔÐØ ×Ò˜ÑÔÐà×+Ò+Ñ-Ô-ˆ Ø ð .Ø×$Ò$Ñ&Ô&ð (Ø— ’ ˜JÑ'Ô'Ð'Ø �HŠH�Z ¨Ñ -Ô -Ð -ð Ø8˜dÔ8¸$¼)ÐDˆDŒOˆOøÝð ð ð Ø Ð Ð Ð Ý ˆIÀ5À5À5È)×J^ÒJ^ÑJ`ÔJ`ÐJ`ÐJ`ÐaÑ bÔ bÐ bØ × Ò Ð>ÀÑFÑ GÔ GÐ GØ ˆFˆFˆFˆFˆFøøøøð  øøøð Œ?Ô *ð 4Ý% d™|œ|ˆDÔ Ø Ô × (Ò (¨Ñ +Ô +Ð +Ý$ T¤_Ô%DÑEÔEˆMØ Ô × Ò  °°tÑ <Ô <Ð <Ø �HŠH�TÔ% u¨dÑ 3Ô 3Ð 3å¥Ô 3Ñ4Ô4ˆŒ Ø Œ ×$Ò$¥VÔ%>Ñ?Ô?Ð?à”Ô3ð (ð (ˆGØ ŒI× Ò ¥Ô!8Ø!(¨¤Ø!(¨¤Ø!&ñ (ô (ð (ð (ð Œ ×ÒÑÔÐà �Š�”˜D $Ñ'Ô'Ð'å”Ñ!Ô!ˆØ ×Ò˜aÑ Ô Ð Ø × Ò  Ñ#Ô#Ð#Ø ×Ò˜qÑ!Ô!Ð!Ø ×Ò˜AÑÔÐà � Š •(Ð/Ñ0Ô0°!°Q¸¸1½fÔ>NÑOÔOÐOØ Œ?Ô #ð &ØŒÔ'Ô,°Ò8Ð8ð8�” õÔ'¨Ô(9Ñ:Ô:Ð:Ý Ð!7Ñ8Ô8��å  ¤Ô!9Ô!>Ñ?Ô?��å˜WÑ%Ô%ˆEØ �Š�Ô(Ñ)Ô)Ð)Ø � Š �%˜˜A˜q !¥VÔ%5µfÔ6FÑ%FÅvÔGYÑ%YÑZÔZÐZà � Š •(Ð+Ñ,Ô,¨a°°A°q½&Ô:JÍ6ÔK[Ñ:[Ñ\Ô\Ð\Ý"°d´oÔ6NÐ#W ? ?ÐTWÑXÔXˆŒØ Œ×!Ò!¥&Ô"2Ñ3Ô3Ð3Ø � Š �$”/ 1 a¨¨A­vÔ/?ÅÔ@PÑ/PÕQWÔQcÑ/cÑdÔdÐdà � Š •(˜:Ñ&Ô&¨¨1¨a°µFÔ4DÅVÔEUÑ4UÑVÔVÐVÝ#Ð$8Ñ9Ô9ˆÔØ Ô×"Ò"¥6Ô#3Ñ4Ô4Ð4Ø � Š �$Ô" A q¨!¨QµÔ0@ÅÔAQÑ0QÑRÔRÐRØ �Š�˜˜tÑ$Ô$Ð$å˜4‘L”LˆŒ Ø Œ ×Ò˜aÑ Ô Ð Ø � Š �T”Y  tÑ,Ô,Ð,åÔ*Ñ,Ô,ˆŒ Ø Œ ×&Ò& z°4Ô3CÀ]ÐTaÑbÔbÐbØ Œ ×&Ò& ~°tÔ7HÈ.ÐZhÑiÔiÐiØ Œ ×"Ò" 4¤:Ñ.Ô.Ð.à Œ � Š •h˜r‘l”l D¨$Ñ/Ô/Ð/å#™+œ+ˆŒØ Œ× Ò  Ñ*Ô*Ð*Ø Œ � Š �d”o u¨dÑ3Ô3Ð3Ø Œ×,Ò,¨T¬[Ñ9Ô9Ð9å$™;œ;ˆÔØ Ô×!Ò!Ð"3Ñ4Ô4Ð4Ø Œ � Š �dÔ&¨¨tÑ4Ô4Ð4Ø Ô×-Ò-¨d¬lÑ;Ô;Ð;å$™;œ;ˆÔØ Ô×!Ò! -Ñ0Ô0Ð0Ø Œ � Š �dÔ&¨¨tÑ4Ô4Ð4Ø Ô×-Ò-¨d¬lÑ;Ô;Ð;å#™+œ+ˆŒØ Œ× Ò  Ñ/Ô/Ð/Ø Œ � Š �d”o u¨dÑ3Ô3Ð3Ø Œ×,Ò,¨T¬[Ñ9Ô9Ð9å'™kœkˆÔØ Ô×$Ò$ YÑ/Ô/Ð/Ø Œ � Š �dÔ)¨5°$Ñ7Ô7Ð7Ø Ô×0Ò0°´Ñ>Ô>Ð>à Œ?Ô #ð 0¨¬Ô(@Ô(EÈÒ(QÐ(QØ#$ˆDÔ Ý Ô   D¤JÑ /Ô /Ð /Ð /Ð /ð 0ð 0Ð(QÐ(QsÄ"D7Ä7 FÅAF Æ Fcó$—|jdz|_|j ¦«}|j t |j¦«¦«t |jj¦«D]!\}}|  |||¦«Œ"dS)NrH) r‚r'Úadd_noderpr7r5Ú enumerater%Ú column_keysÚ set_string)r-Útextr$ÚrowÚidxÚkeys r/rkzLogView.printResultsms‹€Ø#Ô3°aÑ7ˆÔØŒi× Ò Ñ"Ô"ˆØ Œ× Ò ¥ TÔ%9Ñ!:Ô!:Ñ;Ô;Ð;Ý! $¤/Ô"=Ñ>Ô>ð +ð +‰HˆC�Ø �NŠN˜3  S¤ Ñ *Ô *Ð *Ð *ð +ð +r0cóJ—||j ¦«¦«dSr?)r%Úcurrent)r-Úouts r/Úread_data_workerzLogView.read_data_workerts&€Ø ˆˆDŒO× #Ò #Ñ %Ô %Ñ&Ô&Ð&Ð&Ð&r0cóÆ—t|t¦«r/tj dd|zddd¦«d|_dS| |¦«d|_dS)NzError Reading Log Filez%sÚOKrO)Ú isinstancerTrXÚ UtilitiesÚ show_errorr+Úupdate)r-Údatas r/Úhandle_worker_datazLogView.handle_worker_datawsk€Ý �d�IÑ &Ô &ð Ý Ô × 'Ò 'Ð(@Ø(,¨t© °T¸2¸rñ Cô Cð CàˆDŒKØ ˆFØ � Š �DÑÔÐØˆŒ ˆ ˆ r0cóÒ—|jrÝ|j ¦«|js¿|j d¦«|j d¦«|j d¦«|j d¦«|j d¦«t|j |j ¦«|_|j  d¦«dSdSdS)NFrH) r%r@r+ryÚ set_enabledr{rr}r�rr•r�ÚstartrAs r/r@zLogView.refresh€s䀨 Œ?ð %Ø ŒO× #Ò #Ñ %Ô %Ð %Ø”;ð %Ø”×+Ò+¨EÑ2Ô2Ð2ØÔ ×,Ò,¨UÑ3Ô3Ð3Ø”×+Ò+¨EÑ2Ô2Ð2ØÔ ×,Ò,¨UÑ3Ô3Ð3ØÔ#×/Ò/°Ñ6Ô6Ð6õ1°Ô1FÈÔH_Ñ`Ô`�” Ø” ×!Ò! !Ñ$Ô$Ð$Ð$Ð$ð %ð %ð %ð %r0Nc óÀ—|j�rÕ|jjrÀ|jjjdkr«tj|j|j¦«|j d¦«|j  d¦«|j  d¦«|j  d¦«|j   d|jz¦«dS |j ¦«|D]X}|j ¦«}t#|¦«D]-\}}| || ¦«¦«Œ.ŒY|j   |j ¦«¦«|j  |j ¦«¦«|j |j ¦«¦«|j  |j ¦«¦«|j  |j ¦«¦«|j  |j ¦«¦«|j d¦«dS#t4t6t8t:t<t>t@f$r }| !|¦«Yd}~dSd}~wwxYwdS)NrKFzRecords read: %dT)"r%rfrgrirƒr‚rhryrŸr{rr}rqr7r'ÚclearrŠr‹r�ÚstripÚ range_textrpÚ size_textÚ has_previousÚhas_nextr�rÚ RuntimeErrorr rrÚIOErrorÚ ValueErrorr=)r-ÚrecordsÚrecr�r�Úcolr:s r/r›zLogView.updateŽsš€Ø Œ?ñ (ØŒÔ'ð ¨D¬OÔ,DÔ,IÈXÒ,UÐ,UÝÔ$ TÔ%9¸4¼:ÑFÔFÐFØ”×+Ò+¨EÑ2Ô2Ð2ØÔ ×,Ò,¨UÑ3Ô3Ð3Ø”×+Ò+¨EÑ2Ô2Ð2ØÔ ×,Ò,¨UÑ3Ô3Ð3ØÔ ×)Ò)Ð*<¸tÔ?SÑ*SÑTÔTÐTØ�ð (Ø” —’Ñ!Ô!Ð!Ø"ð9ð9�CØœ)×,Ò,Ñ.Ô.�CÝ$-¨c¡N¤Nð9ð9™˜˜SØŸš s¨C¯IªI©K¬KÑ8Ô8Ð8Ð8ð9àÔ ×)Ò)¨$¬/×*DÒ*DÑ*FÔ*FÑGÔGÐGØ”×(Ò(¨¬×)BÒ)BÑ)DÔ)DÑEÔEÐEØ”×+Ò+¨D¬O×,HÒ,HÑ,JÔ,JÑKÔKÐKØÔ ×,Ò,¨T¬_×-IÒ-IÑ-KÔ-KÑLÔLÐLØÔ ×,Ò,¨T¬_×-EÒ-EÑ-GÔ-GÑHÔHÐHØ”×+Ò+¨D¬O×,DÒ,DÑ,FÔ,FÑGÔGÐGØÔ#×/Ò/°Ñ5Ô5Ð5Ð5Ð5øÝ!¥<Õ1CÕE\Õ^rÕt{õ~HðIð (ð (ð (Ø× Ò  Ñ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'øøøøð (øøøð- (ð (sÃF4J Ê /KÊ;KËKcó—|j ¦«}g}|D]4}| | |jj¦«¦«Œ5|r4t j d  |¦«¦«dSdS)NrG) r'Ú get_selectionÚappendÚ get_stringr%Ú detail_columnrXr™Úset_clipboard_textÚjoin)r-Ú selectionrŽÚnodes r/rwzLogView.copy_details¨s�€Ø”I×+Ò+Ñ-Ô-ˆ ؈Øð Hð HˆDØ �KŠK˜Ÿš¨¬Ô(EÑFÔFÑ GÔ GÐ GÐ GØ ð AÝ Ô × /Ò /°· ² ¸$±´Ñ @Ô @Ð @Ð @Ð @ð Að Ar0cóø—|j ¦«}d d„|jjD¦«¦«g}|D]}}g}t t |jj¦«¦«D]*}| | |¦«¦«Œ+| d |¦«¦«Œ~|r4tj   d |¦«¦«dSdS)Nz, có—g|] }|d‘Œ S)rrC)Ú.0Úrs r/ú z'LogView.copy_record..²s€ÐFÐFÐF A˜1˜Qœ4ÐFÐFÐFr0rG) r'r¯r´r%r\ÚrangeÚlenr°r±rXr™r³)r-rµrŽr¶ÚrecordÚis r/rvzLogView.copy_record°s󀨔I×+Ò+Ñ-Ô-ˆ Ø— ’ ÐFÐF¨¬Ô)EÐFÑFÔFÑGÔGÐHˆØð +ð +ˆD؈FÝ�3˜tœÔ;Ñ<Ô<Ñ=Ô=ð 2ð 2�Ø— ’ ˜dŸošo¨aÑ0Ô0Ñ1Ô1Ð1Ð1Ø �KŠK˜Ÿ š  &Ñ)Ô)Ñ *Ô *Ð *Ð *Ø ð AÝ Ô × /Ò /°· ² ¸$±´Ñ @Ô @Ð @Ð @Ð @ð Að Ar0c ó— | |j ¦«¦«dS#ttt t tttf$r }|  |¦«Yd}~dSd}~wwxYwr?) r›r%Úfirstrr¨r rrr©rªr=©r-r:s r/rzzLogView.go_bof»s�€ð $Ø �KŠK˜œ×-Ò-Ñ/Ô/Ñ 0Ô 0Ð 0Ð 0Ð 0øÝ�|Õ-?ÕAXÕZnÕpwõzDðEð $ð $ð $Ø × Ò ˜UÑ #Ô #Ð #Ð #Ð #Ð #Ð #Ð #Ð #øøøøð $øøøó‚,0°/A?ÁA:Á:A?c ó— | |j ¦«¦«dS#ttt t tttf$r }|  |¦«Yd}~dSd}~wwxYwr?) r›r%Úlastrr¨r rrr©rªr=rÂs r/r€zLogView.go_eofÁs�€ð $Ø �KŠK˜œ×,Ò,Ñ.Ô.Ñ /Ô /Ð /Ð /Ð /øÝ�|Õ-?ÕAXÕZnÕpwõzDðEð $ð $ð $Ø × Ò ˜UÑ #Ô #Ð #Ð #Ð #Ð #Ð #Ð #Ð #øøøøð $øøørÃc ó>— |j ¦«r|j ¦«nd}| |¦«dS#tt t ttttf$r }|  |¦«Yd}~dSd}~wwxYwr?) r%r¦Úpreviousr›rr¨r rrr©rªr=©r-r«r:s r/r|zLogView.go_backÇs«€ð $Ø48´O×4PÒ4PÑ4RÔ4RÐ\�d”o×.Ò.Ñ0Ô0Ð0ÐX\ˆGØ �KŠK˜Ñ Ô Ð Ð Ð øÝ�|Õ-?ÕAXÕZnÕpwõzDðEð $ð $ð $Ø × Ò ˜UÑ #Ô #Ð #Ð #Ð #Ð #Ð #Ð #Ð #øøøøð $øøøs‚A A Á /BÁ<BÂBc ó4— |j ¦«rt|j¦«nd}| |¦«dS#tt t ttttf$r }|  |¦«Yd}~dSd}~wwxYwr?) r%r§Únextr›rr¨r rrr©rªr=rÈs r/r~zLogView.go_nextÎs¦€ð $Ø/3¬×/GÒ/GÑ/IÔ/IÐS•d˜4œ?Ñ+Ô+Ð+ÈtˆGØ �KŠK˜Ñ Ô Ð Ð Ð øÝ�|Õ-?ÕAXÕZnÕpwõzDðEð $ð $ð $Ø × Ò ˜UÑ #Ô #Ð #Ð #Ð #Ð #Ð #Ð #Ð #øøøøð $øøøs‚AAÁ/BÁ7BÂBr?)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr=r9rDr*rkr•r�r@r›rwrvrzr€r|r~Ú __classcell__©r.s@r/rr¼s?ø€€€€€ððð ððððð0ð .ð .ñÔð .ðððð ð ð ð{0ð{0ð{0ðz+ð+ð+ð'ð'ð'ðððð %ð %ð %ð(ð(ð(ð(ð4AðAðAð Að Að Að$ð$ð$ð $ð$ð$ð $ð$ð$ð$ð$ð$ð$ð$ð$ð$r0rcó<‡—eZdZˆfd„Zd„Zd„Zd„Zdˆfd„ ZˆxZS)ÚLogViewGenericcóš•—i|_tjd¦«|_d|_t t |¦«j||g|¢RŽdS)NTrO)Ú filter_listrXrr„Ú filter_textrrÒrr,s €r/rzLogViewGeneric.__init__×sRø€ØˆÔÝ œ-¨Ñ-Ô-ˆŒØˆÔà,��n˜dÑ#Ô#Ô,¨UÐ4IÐQÈDÐQÐQÐQÐQÐQÐQr0cóØ—tjd¦«}| |¦«| |j¦«||j|<|j |dd¦«dS)NrHFT)rXÚnewRadioButtonr7r8Úfilter_handlerrÔr„r6©r-rŽÚfilters r/Úadd_filter_optionz LogViewGeneric.add_filter_optionÞsh€ÝÔ& qÑ)Ô)ˆØ�Š˜ÑÔÐØ×#Ò# DÔ$7Ñ8Ô8Ð8à!'ˆÔ˜ÑØ Œ×Ò˜F E¨4Ñ0Ô0Ð0Ð0Ð0r0cóÌ—| d¦«| d¦«tjjjjdks| d¦«|jS)NÚAllÚInnoDBÚ CommunityÚFirewall)rÛriÚrootÚwbÚinfoÚeditionr„rAs r/rDz LogViewGeneric.create_filter_boxæs[€Ø ×Ò˜uÑ%Ô%Ð%Ø ×Ò˜xÑ(Ô(Ð(åŒxŒ{ÔÔ'¨;Ò6Ð6Ø × "Ò " :Ñ .Ô .Ð .ØŒÐr0có¢—|j ¦«D] \}}| ¦«r||_Œ!| ¦«dSr?)rÔÚitemsÚ get_activerÕr@rÙs r/rØzLogViewGeneric.filter_handlerîsR€Ø Ô,×2Ò2Ñ4Ô4ð (ð (‰LˆD�&Ø× Ò Ñ"Ô"ð (Ø#'�Ô øà � Š ‰Œˆˆˆr0Ncó\•—d}|r~g}|D]y}t|d¦«}|jdksB| ¦« |j ¦«¦«dkr| |¦«Œzt t |¦« |¦«dS)NrMrÝr)rrÕÚlowerÚfindr°rrÒr›)r-r«Úfiltered_recordsr¾rŽr.s €r/r›zLogViewGeneric.updateõs¯ø€ØÐØ ð 4Ø!Ð Ø!ð 4ð 4�Ý! &¨¤)Ñ,Ô,�ØÔ# uÒ,Ð,°· ² ± ´ ×0AÒ0AÀ$ÔBR×BXÒBXÑBZÔBZÑ0[Ô0[Ð_`Ò0`Ð0`Ø$×+Ò+¨FÑ3Ô3Ð3øÝ �n˜dÑ#Ô#×*Ò*Ð+;Ñ<Ô<Ð<Ð<Ð.open_remote_fileNs¿ø€Ø0Ð0Ð0Ð0ð )Ø"&¤,Ô"2×"=Ò"=Ñ"?Ô"?˜CØ×/Ò/°Ô0CÐEV×EfÒEfÐgkÔgzÑE{ÔE{Ñ|Ô|Ð|Ø"ŸšÑ0Ô0°AÒ5Ð5Ø #§¢¨¡¤ Ø #§ ¢ ¡ ¤   Ø#' 4øÝ(ð)ð)ð)Ý%Ð&GÈÑNÔNÐNØ#( 5 5ð)øøøs‡BBÂB9Â8B9Ú general_logÚslow_logÚ stored_general_log_source_choiceÚstored_slow_log_source_choice)rÚis_sql_connectedÚtarget_versionÚ#is_supported_mysql_version_at_leastÚ exec_queryÚnextRowÚ stringByNameròrñrr.rËÚ admin_enabledÚgetattrÚgeneral_log_file_pathÚis_localr$r)Úslow_log_file_pathr*)r-ÚdestÚresultr&s` r/Úget_log_destinationzWbAdminLogs.get_log_destination8sŠø€ØˆØ Œ<× (Ò (Ñ *Ô *ñC VØ”<Ô.×RÒRÐSTÐUVÐWXÑYÔYðB Vð Ø!œ\×4Ò4Ð5PÑQÔQ�FØ!Ÿ>š>Ñ+Ô+ð$Ø#˜ ð$øð Ø�K�K�KøøøØ:@×:MÒ:MÈgÑ:VÔ:VÐX\Ò:\Ð:\°°Ðbh�Ô"Ô-ݰT´^Ô5LÐ5LÐ5LÈdÔN`ÔNkÐNkÐNkÐlÑnÔnÐnÑnð Ø!œ\×4Ò4Ð5WÑXÔX�FØ!Ÿ>š>Ñ+Ô+ð$Ø#˜ ð$øð Ø�K�K�KøøøØ06×0CÒ0CÀGÑ0LÔ0L�Ô"Ô-à˜TÔ/Ô:Ð:Ñ:¸wÈ$ÔJ\ÔJgÐ?gÑ?gð )ð )ð )ð )ð )ð Ô-Ô;ð$Ø.5˜˜]Ñ+Ø+2˜˜ZÑ(Ý!¸T¼^Ô=TÐ=TÐ=TÐVZÐVZÐVZÐ"[Ñ]Ô]Ð]Ø#˜ õ# 4Ð)KÈTÑRÔRð TØÔ-ÔCð:ð>ØRVÔRdÔRmð!n¥ TÔ%7Ô%MÑ NÔ NÐ NðtDðtDðEIôEWôEmñtnôtnøØ6<  ]Ñ 3Ð 3øð>Ø6=  ]Ñ 3Ð 3Ð 3øøøà29˜D Ñ/Ø@DÀ]Ô@S˜Ô=Ð=à.2Ô.S˜˜]Ñ+å" 4Ð)HÈ$ÑOÔOð NØÔ-Ô@ð7ð;ØOSÔOaÔOjð!h¥ TÔ%7Ô%JÑ KÔ KÐ KðqAðqAðBFôBTôBgñqhôqhøØ39  ZÑ 0Ð 0øð;Ø3:  ZÑ 0Ð 0Ð 0øøøà/6˜D Ñ,Ø=AÀ*Ô=M˜Ô:Ð:à+/Ô+M˜˜ZÑ(ݰT´^Ô5LÐ5LÐ5LÈdÈdÈdÐSÑUÔUÐU؈ s0Á/A1Á1A7à /C>Ã>DÆ?GÇG'È%?I%É%I.có¢—|j |¦«|j d¦«|j d¦«dS)NTF)Úwarningr7Úshowr)r-Úmsgs r/Úshow_message_panelzWbAdminLogs.show_message_panel€sJ€Ø Œ ×Ò˜cÑ"Ô"Ð"Ø Œ ×Ò˜$ÑÔÐØ Œ ×Ò˜%Ñ Ô Ð Ð Ð r0cóX—d|vrt|¦«ddgz}d|vrt|¦«ddgz}d|vr-|jr&|j |j¦«d|_d|vr-|jr&|j |j¦«d|_d|vr-|jr&|j |j¦«d|_d|vr-|jr&|j |j¦«d|_d|vr/|jr*|j |j¦«d|_dSdSdS)NrLÚ general_tabÚslow_tabrôÚgeneral_file_tabÚ slow_file_tabÚerror_file_tab)ÚlistrrÚ remove_pagerrrr©r-Úsources r/Ú _remove_tabszWbAdminLogs._remove_tabs…s[€Ø �fРРݘ&‘\”\ ]°JÐ$?Ñ?ˆFà �VРРݘ&‘\”\Ð%7¸Ð$IÑIˆFà ˜FÐ "Ð " tÔ';Ð "Ø ŒL× $Ò $ TÔ%9Ñ :Ô :Ð :Ø#'ˆDÔ Ø ˜Ð Ð  DÔ$5Ð Ø ŒL× $Ò $ TÔ%6Ñ 7Ô 7Ð 7Ø#ˆDÔ Ø  Ð 'Ð '¨DÔ,EÐ 'Ø ŒL× $Ò $ TÔ%>Ñ ?Ô ?Ð ?Ø(,ˆDÔ %Ø ˜fÐ $Ð $¨Ô)?Ð $Ø ŒL× $Ò $ TÔ%;Ñ <Ô <Ð <Ø%)ˆDÔ "Ø ˜vÐ %Ð %¨$Ô*AÐ %Ø ŒL× $Ò $ TÔ%<Ñ =Ô =Ð =Ø&*ˆDÔ #Ð #Ð #ð &Ð %Ð %Ð %r0có¬—d|vrt|¦«ddgz}d|vrt|¦«ddgz}d|vr™|jjr�|js† t |t |j|jj¦«|_|j |jd¦«n9#t$r,|  d |jjz¦«d|_YnwxYwd|vr¥|jj r™|jj r�|j s† t|t|j|jj ¦«|_ |j |j d ¦«n9#t$r,|  d |jj z¦«d|_ YnwxYwd|vr¥|jjr™|jjr�|js† t|t&|j|jj¦«|_|j |jd ¦«n9#t$r,|  d |jjz¦«d|_YnwxYwd|vrS|jj rG|js@t|t*|j¦«|_|j |jd ¦«d|vrU|jjrK|jsFt|t.|j¦«|_|j |jd¦«dSdSdSdS)NrLr?r@rôrArBrCzError Log FilezYThere was a problem reading %s. Please verify that you have read permissions on that filezGeneral Log FilezYThere was a problem reading %s. Please verify that you have read permissions on that filez Slow Log FilezGeneral Log TablezSlow Query Log Table)rDròÚerror_log_file_pathrrÒr rrÚadd_pager©r=Úgeneral_log_enabledr3rrr Úslow_log_enabledr5rr rrrr rFs r/Ú _add_tabszWbAdminLogs._add_tabsœsž€Ø �fРРݘ&‘\”\ ]°JÐ$?Ñ?ˆFà �VРРݘ&‘\”\Ð%7¸Ð$IÑIˆFà ˜vÐ %Ð %¨$Ô*<Ô*PÐ %ÐY]ÔYpÐ %ð /Ý*8¸Õ?QÐSWÔS_ÐaeÔasôbHñ+Iô+I�Ô'Ø” ×%Ò% dÔ&=Ð?OÑPÔPÐPÐPøÝð /ð /ð /Ø×'Ò'ð)DðGKôGYôGmñ)mñnônðnØ*.�Ô'Ð'Ð'ð /øøøð  Ð 'Ð '¨DÔ,>Ô,RÐ 'ÐW[ÔWiÔWÐ 'ðIMôIbÐ 'ð 1Ý,3°DÕ:NÐPTÔP\Ð^bÔ^pô_Gñ-Hô-H�Ô)Ø” ×%Ò% dÔ&?ÐASÑTÔTÐTÐTøÝð 1ð 1ð 1Ø×'Ò'ð)EðHLôHZôHpñ)pñqôqðqØ,0�Ô)Ð)Ð)ð 1øøøð ˜fÐ $Ð $¨Ô);Ô)LÐ $ÐQUÔQcÔQvÐ $ð@Dô@VÐ $ð .Ý)0°Õ7HÈ$Ì,ÐX\ÔXjÔX}Ñ)~Ô)~�Ô&Ø” ×%Ò% dÔ&<¸oÑNÔNÐNÐNøÝð .ð .ð .Ø×'Ò'ð)DðGKôGYôGlñ)lñmômðmØ)-�Ô&Ð&Ð&ð .øøøð ˜FÐ "Ð " tÔ'9Ô'MÐ "ÐVZÔVjÐ "Ý#*¨4Õ1FÈÌ Ñ#UÔ#UˆDÔ Ø ŒL× !Ò ! $Ô"6Ð8KÑ LÔ LÐ Là ˜Ð Ð  DÔ$6Ô$GÐ ÐPTÔPaÐ Ý '¨Õ.@À$Ä,Ñ OÔ OˆDÔ Ø ŒL× !Ò ! $Ô"3Ð5KÑ LÔ LÐ LÐ LÐ Lð Ð Ð Ð Ð Ð s9Á A BÂ3C à C Ã2A D>Ä>3E4Å3E4ÆA G'Ç'3HÈHcó€—| ¦«}| d¦«|jjs d|j_d|jjvr| dd¦«�nL|jjdkr,| d¦«| d¦«�n|jjdkr+| d¦«| d¦«nÕ|jjdks|jjdkrµt gd¢¦«}g}|j ¦«sdd g}nF| |d dkrdnd ¦«| |d dkrd nd ¦«|jt|t |¦«z ¦«Ž|jt|¦«Ž|j   d¦« |  ¦«dS#t$rN}tj dd|zddd¦«}|tjkr d|_Yd}~dSYd}~dSd}~wwxYw)NrCrörrLrôrõ)r?r@rArBrArBr'r?r(r@Tz Log Refreshz8An error occurred while displaying MySQL server logs: %sÚIgnoreÚCancelrO)r8rNròrñrHÚsetrr+r°Útuplerr;r@rTrXr™Ú show_warningÚ ResultCancelr )r-r6ÚtabsÚ to_be_addedÚerºs r/r*zWbAdminLogs.update_uiÄs‹€Ø×'Ò'Ñ)Ô)ˆà �ŠÐ'Ñ(Ô(Ð(àÔ!Ô,ð 9Ø,8ˆDÔ Ô )à �TÔ'Ô2Ð 2Ð 2Ø × Ò ˜g vÑ .Ô .Ð .Ñ .à Ô Ô *¨fÒ 4Ð 4Ø × Ò ˜gÑ &Ô &Ð &Ø �NŠN˜6Ñ "Ô "Ð "Ñ "à Ô Ô *¨gÒ 5Ð 5Ø × Ò ˜fÑ %Ô %Ð %Ø �NŠN˜7Ñ #Ô #Ð #Ð #à Ô Ô *¨lÒ :Ð :¸dÔ>PÔ>[Ð_kÒ>kÐ>kÝÐWÐWÐWÑXÔXˆD؈KØ”<×0Ò0Ñ2Ô2ð bØ1°?ÐC� � à×"Ò"¸¸mÔ9LÐPVÒ9VÐ9VÐ#5Ð#5Ð\iÑjÔjÐjØ×"Ò"°d¸:Ô6FÈ&Ò6PÐ6P ? ?ÐV`ÑaÔaÐaØ ˆDÔ ¥ d­S°Ñ-=Ô-=Ñ&=Ñ >Ô >Ð @Ð @Ø ˆDŒN�U ;Ñ/Ô/Ð 1Ð 1à Œ ×Ò˜$ÑÔÐð 0Ø �LŠL‰NŒNˆNˆNˆNøÝð 0ð 0ð 0ÝÔ ×-Ò-¨mÐ=wÐz{Ñ={ð~FðHPðRTñUôUˆAØ•FÔ'Ò'Ð'Ø+/�Ô(Ð(Ð(Ð(Ð(Ð(Ð(ð(Ð'Ð'Ð'Ð'Ð'øøøøð 0øøøsÇG%Ç% H=Ç/=H8È8H=cóp—|j d¬¦«}|dv�r�t|jj|jj|jj|jjg¦«�sUtj |j|j¦«}|  |jj d¬¦«t|  |jj¦«¦«}|jjsd|vr|d|j_|jjs;d|vr|dn d|vr|dnd }|r| d ¦«|j_|jjs;d |vr|d n d |vr|d nd }|r| d ¦«|j_|jjs/d |vr-|d  d ¦«|j_dSdSdSdSdS)Nr)Úverbose)ÚstoppedÚunknownF)Ú warn_missingz log-outputÚgeneral_log_fileÚlogrOú"Úslow_query_log_filezlog-slow-queriesz log-error)rÚis_server_runningÚallròr3r5rJrñÚwb_admin_config_file_beÚWbAdminConfigFileBEÚopen_configuration_fileÚconfig_file_pathÚdictÚ get_optionsÚconfig_file_sectionÚ log_ouputr£)r-ÚstatusÚcfg_beÚoptionsrgs r/rzWbAdminLogs.detect_pathsës€à”×/Ò/¸Ð/Ñ:Ô:ˆØ Ð+Ð +Ñ +µCØÔ$Ô:ØÔ$Ô7ØÔ$Ô8ØÔ$Ô/ð2ñ54ô54Ñ +õ -Ô@ÀÔASÐUYÔUaÑbÔbˆFØ × *Ò *¨4Ô+=Ô+NÐ]bÐ *Ñ cÔ cÐ cݘ6×-Ò-¨dÔ.@Ô.TÑUÔUÑVÔVˆGàÔ%Ô0ð E°\ÀWÐ5LÐ5LØ/6°|Ô/D�Ô"Ô,àÔ%Ô;ð OØ6HÈGÐ6SÐ6S�wÐ1Ô2Ð2Ø).°'Ð)9Ð)9�w˜u”~�~¸rðàðOØ?C¿zºzÈ#¹¼�DÔ&Ô<àÔ%Ô8ð LØ9NÐRYÐ9YÐ9Y�wÐ4Ô5Ð5Ø6HÈGÐ6SÐ6S�wÐ1Ô2Ð2ÐY[ðàðLØ<@¿JºJÀs¹O¼O�DÔ&Ô9àÔ%Ô9ð Y¸kÈWÐ>TÐ>TØ9@ÀÔ9M×9SÒ9SÐTWÑ9XÔ9X�Ô"Ô6Ð6Ð6ð5 ,Ð +Ð +Ð +ð2 Yð YÐ>TÐ>Tr0cóŽ—|jrdS|j ¦«r@|jr|j ¦«|jr|j ¦«|jr|j ¦«|jr|j ¦«|jr|j ¦«dSdSr?) r rr+rr@rrrrrAs r/r@zWbAdminLogs.refresh sØ€Ø Ô #ð Ø ˆFØ Œ<× (Ò (Ñ *Ô *ð ,ØÔ#ð /ØÔ$×,Ò,Ñ.Ô.Ð.ØÔ ð ,ØÔ!×)Ò)Ñ+Ô+Ð+Ø Ô $ð 0Ø Ô %× -Ò -Ñ /Ô /Ð /Ø Ô !ð -Ø Ô "× *Ò *Ñ ,Ô ,Ð ,Ø Ô "ð .Ø Ô #× +Ò +Ñ -Ô -Ð -Ð -Ð -ð .ð .r0có—dSr?rCrAs r/Ú do_refreshzWbAdminLogs.do_refreshrEr0N)rËrÌrÍÚ ui_createdÚ classmethodrrrrrr8r=rHrNr*rr@rqrCr0r/rùrù s€€€€€Ø€JàðYðYñ„[ðYðð#ð#ñ„[ð#ð'ð'ð'ð [ð [ð [ð ð ð ðFðFðFðP!ð!ð!ð +ð+ð+ð.&Mð&Mð&MðP%0ð%0ð%0ðNYðYðYð@ .ð .ð .ð ð ð ð ð r0rù)&rÎrirXrrrrrÚ wb_log_readerrr r r r rdÚ wb_commonr rrrrrÚworkbench.utilsrÚ workbench.logrrÚwb_admin_utilsrrrrrÚBoxrrÒrírùrCr0r/úrzs_ðð,VðVðp € € € ØGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGÐGØ € € € ðAðAðAðAðAðAðAðAðAðAðAðAðAðAØÐÐÐðHðHðHðHðHðHðHðHðHðHðHðHðHðHðHðHØ.Ð.Ð.Ð.Ð.Ð.à.Ð.Ð.Ð.Ð.Ð.Ð.Ð.ðZðZðZðZðZðZðZðZðZðZðZðZðZðZðW$ðW$ðW$ðW$ðW$ˆfŒjñW$ôW$ðW$ðt'=ð'=ð'=ð'=ð'=�Wñ'=ô'=ð'=ðT oð oð oð oð oÐ%:ñ oô oð oðN ðN ðN ðN ðN �.ñN ôN ðN ðN ðN r0