MCPcopy Create free account
hub / github.com/ForgeRock/forgeops / log

Function log

lib/python/common.py:52–64  ·  view source on GitHub ↗

Log a message to the upgrade log

(msg, path, verbose=True, log_file='upgrade.log', end="\n")

Source from the content-addressed store, hash-verified

50
51
52def log(msg, path, verbose=True, log_file='upgrade.log', end="\n"):
53 """ Log a message to the upgrade log """
54 log_path = path / log_file
55 if not log_path.is_file():
56 msg = f"""{msg}
57
58WARNING!! {log_path} doesn't exist, creating.
59Do a `git add {log_path}` to track.
60"""
61 if verbose:
62 print(msg, end=end)
63 with open(log_path, 'a', encoding='utf-8') as log_f:
64 log_f.write(f"{msg}{end}")
65
66def setup_args():
67 """ Setup the common arguments """

Callers 5

update_secrets_2025_2_0Function · 0.90
update_apps_2025_2_0Function · 0.90
update_secrets_2026_1_0Function · 0.90
runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected