feat(config): In systemd make logging output slimmer
This commit is contained in:
		| @@ -62,12 +62,16 @@ class CONST(object): | ||||
| {%- if cookiecutter.rich_logging == "yes" %} | ||||
|  | ||||
|  | ||||
| is_systemd = any([systemd_env_var in os.environ for systemd_env_var in ["SYSTEMD_EXEC_PID", "INVOCATION_ID"]]) | ||||
| logging.basicConfig( | ||||
|     # Default for all modules is NOTSET so log everything | ||||
|     level="NOTSET", | ||||
|     format=CONST.LOG_FORMAT, | ||||
|     datefmt="[%X]", | ||||
|     handlers=[RichHandler( | ||||
|         show_time=False if is_systemd else True, | ||||
|         show_path=False if is_systemd else True, | ||||
|         show_level=False if is_systemd else True, | ||||
|         rich_tracebacks=True | ||||
|     )] | ||||
| ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user