MCPcopy Create free account
hub / github.com/archlinux/archinstall / log

Method log

archinstall/lib/log.py:46–52  ·  view source on GitHub ↗
(self, level: int, content: str)

Source from the content-addressed store, hash-verified

44 warn(f'Not enough permission to place log file at {log_file}, creating it in {logger.path} instead')
45
46 def log(self, level: int, content: str) -> None:
47 self._check_permissions()
48
49 with self.path.open('a') as f:
50 ts = timestamp()
51 level_name = logging.getLevelName(level)
52 f.write(f'[{ts}] - {level_name} - {content}\n')
53
54 def get_content(self, max_bytes: int | None = None) -> bytes:
55 content = self.path.read_bytes()

Callers 2

journal_logFunction · 0.80
logFunction · 0.80

Calls 3

_check_permissionsMethod · 0.95
timestampFunction · 0.90
writeMethod · 0.45

Tested by

no test coverage detected