Commit Graph

23 Commits

Author SHA1 Message Date
Maciej Borzecki 5c266cc38c subiquitycore/log: use 'root' as group for strictly confined snaps
When setting up the logging in a strictly confined snap, use the 'root' group,
rather than 'adm'. This will not interfere with the sandbox's policy but also
does not result in providing wider access to the logs.

Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
2024-02-05 16:18:03 +01:00
Dan Bungert 84bcd5f7c8 log: move /var/log/installer back to 0770 root:adm 2023-10-10 13:25:26 +01:00
Dan Bungert c9cfdafe0c log: create /var/log/installer root only 2023-10-05 18:03:32 -06:00
Dan Bungert 4a4e8ba886 util: explicit isdir arg from set_log_perms
target already exists, we should just inspect target and find if it is a
directory or not.
2023-10-03 18:56:07 -06:00
Dan Bungert 34d40643ad format with black + isort 2023-07-25 15:27:42 -06:00
Dan Bungert 953998b23a logging: 0770 log dir in install env, 0750 later 2022-03-11 12:44:22 -07:00
Dan Bungert fae24f3247 logging: log files 0640 root:adm 2022-02-14 11:14:10 -07:00
Michael Hudson-Doyle 7f6af23694 set wider permissions on log directory 2021-09-23 21:24:44 +12:00
Michael Hudson-Doyle 53d06961cc append, do not overwrite logs
The log file names have pids in now, but when subiquity re-execs itself
to fake a snap refresh the pid doesn't change. Having the pre "refresh"
logs get overwritten does not help anything and is sometimes very
annoying.
2020-12-18 12:18:40 +13:00
Michael Hudson-Doyle edc43ff811 add a minimal server process
run it automatically in dry-run mode
2020-09-22 14:43:26 +12:00
Michael Hudson-Doyle d08cce4970 create an INFO level log file too, unconditionally include it in error reports 2019-12-12 21:49:44 +13:00
Michael Hudson-Doyle fb6ea590a5 still create a subiquity-debug.log symlink 2019-09-30 16:21:42 +13:00
Michael Hudson-Doyle 7c1154b758 create one log file per invocation
Log to subiquity-debug.log.$PID instead of just subiquity-debug.log.

When we implement error reports we'll obviously attach the log to the
error report. There's no point adding log messages from previous runs of
subiquity.
2019-09-30 13:47:56 +13:00
Michael Hudson-Doyle b6bf3fcc42 a bit too much effort making one particular log statement look nice 2019-09-09 15:32:49 +12:00
Ryan Harper 3c9b2e28c7 Drop commented out / dead code 2018-05-23 18:53:12 -05:00
Michael Hudson-Doyle bfba9f21b5 remove unused stuff from log.py 2017-01-13 15:08:31 +13:00
Michael Hudson-Doyle cd2758cc90 do not override datefmt so we get seconds (and even microseconds) in the logs 2016-09-21 11:56:04 +12:00
Michael Hudson-Doyle f79c82a367 use os.makedirs with exist_ok to create log directory
Should fix LP: #1617236
2016-08-30 10:50:20 +12:00
Michael Hudson-Doyle e4d5c7fa85 stuff 2016-07-28 11:13:19 +12:00
Mathieu Trudel-Lapierre 1c7fbac977 Update paths to /writable for snappy 2016-07-27 22:16:26 +12:00
Michael Hudson-Doyle 264f698299 Fix flake8 warnings in subiquitycore.
Except for line length warnings, because life is too short of that.

A few of these are real bugs.
2016-07-25 14:44:51 +12:00
Mathieu Trudel-Lapierre be0457f9ea Don't filter logs at all.
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:51:46 -04:00
Mathieu Trudel-Lapierre e1970b6477 Rename subiquity to subiquitycore -- will serve as base classes for everything
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2016-06-30 14:17:01 -04:00