
    Se                        U d Z ddlZddlmZ ddlmZ ddlmZ ej                  Zddl	m
Z
mZ ddlmZmZ ddlmZmZmZ dd	lmZmZ dd
lmZ ddlmZ dZej2                  Zej6                  aej8                  aej:                  Zej<                  Zej>                  Zej@                  Z ejB                  Z!	 ddl"m#Z# dZ$ ejL                  d      Z' ejL                  d      Z( ejR                  e*      Z+ ejX                         Z-e-j]                  e'       e-j_                  e       e+ja                  e-       ej2                  ejb                  ejd                  dZ3e4e5d<   e$rD e#       Z6e6j_                  ejb                         e6j]                  e'       e+ja                  e6       e+j_                  ejd                         dde7ddfdZ8de9ddfdZ:ejv                  Z;ejx                  Z<ejz                  Z=ej|                  Z>ej~                  Z?ej                  Z@ej                  ZAej                  ZBej                  ZCej                  ZDej                  ZEej                  ZFej                  ZGej                  ZHej                  ZIej                  ZJej                  ZKej                  ZLej                  ZMej                  ZNy# e%$ r dZ$Y w xY w)a  
Copyright (c) 2019-2022, Ian Santopietro
All rights reserved.

This file is part of RepoLib.

RepoLib is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RepoLib is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RepoLib.  If not, see <https://www.gnu.org/licenses/>.
    N)Path   )__version__)
SourceFileSourceFileError)SourceSourceError)	PPASourcePopdevSourceshortcut_prefixes)	SourceKeyKeyFileError)util)systemz/var/log/repolib.log)JournalHandlerTFz(%(name)-21s: %(levelname)-8s %(message)sz6%(asctime)s - %(name)-21s: %(levelname)-8s %(message)s)r   r      log_level_maptestingreturnc                 p    t        j                  |        t         j                  at         j                  ay)zPuts Repolib into testing moder   N)r   set_testingKEYS_DIRSOURCES_DIRr   s    2/usr/lib/python3/dist-packages/repolib/__init__.pyr   r   [   s&    
 	W%}}H""K    levelc                 \    | dkD  rd} | dk  rd} t         |    }t        j                  |       y)a  Set the logging level for this current repolib

    Accepts an integer between 0 and 2, with 0 being the default loglevel of
    logging.WARNING, 1 being logging.INFO, and 2 being logging.DEBUG.

    Values greater than 2 are clamped to 2. Values less than 0 are clamped to 0.

    Note: This only affects console output. Log file output remains 
    at logging.INFO
    
    Arguments:
        level(int): A logging level from 0-2
    r   r   N)r   console_logsetLevel)r   	LOG_LEVELs     r   set_logging_levelr"   e   s4     qyqye$I#r   )T)O__doc__logginglogging.handlershandlerspathlibr    r   VERSIONfiler   r   sourcer   r	   	shortcutsr
   r   r   keyr   r   r   r   LOG_FILE_PATHWARNINGr!   r   r   TESTINGKEYSERVER_QUERY_URLDISTRO_CODENAMEPRETTY_PRINTCLEAN_CHARSsystemd.journalr   systemd_supportImportError	Formatter
stream_fmtfile_fmt	getLogger__name__logStreamHandlerr   setFormatterr    
addHandlerINFODEBUGr   dict__annotations__journald_logboolr   intr"   	RepoErrorSourceFormat
SourceTypeAptSourceEnabledscrub_filenameurl_validatorprettyprint_enablevalidate_deblinestrip_hashescompare_sourcescombine_sourcessourcesfileskeyserrors
valid_keysoptions_inmapoptions_outmaptrue_valuesload_all_sources r   r   <module>r]      s  (  #  

!
! - ' A A (  &OO	==
,,.. &&  .O
 W/
 7< g!#g##%    $   Y  {  ||}}d  !#L',,'j)NN<  W]] # # #$C $D $* NN	  __
(( $$"",, ((   &&&&
,,

yy	__
""$$** y  Os   7K KK