mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Added logging path
This commit is contained in:
parent
33c6d676c2
commit
428f37b151
2 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,8 @@ class Configs:
|
|||
}
|
||||
|
||||
prog_name: str = 'slpkg'
|
||||
root_slpkg: Path = Path(Path.home(), f'.{prog_name}')
|
||||
log_path: Path = Path(root_slpkg, 'logs')
|
||||
os_arch: str = platform.machine()
|
||||
tmp_path: str = '/tmp/'
|
||||
tmp_slpkg: Path = Path(tmp_path, prog_name)
|
||||
|
@ -114,6 +116,7 @@ class Configs:
|
|||
# Creating the paths if not exists
|
||||
paths = [
|
||||
tmp_slpkg,
|
||||
log_path,
|
||||
build_path,
|
||||
download_only_path,
|
||||
lib_path,
|
||||
|
|
|
@ -24,7 +24,7 @@ class Upgrade(Configs):
|
|||
self.repo_for_binaries: bool = self.utils.is_option(self.flag_bin_repository, self.flags)
|
||||
|
||||
self.all_installed: list = self.utils.installed_package_names
|
||||
logging.basicConfig(filename='slpkg_upgrade.log', encoding='utf-8', level=logging.DEBUG)
|
||||
logging.basicConfig(filename=f'{self.log_path}/slpkg_upgrade.log', encoding='utf-8', level=logging.DEBUG)
|
||||
|
||||
def packages(self) -> Generator[str, None, None]:
|
||||
""" Returns the upgradable packages. """
|
||||
|
|
Loading…
Reference in a new issue