Merge pull request #1825 from dbungert/log

Log
This commit is contained in:
Dan Bungert 2023-10-05 18:58:19 -06:00 committed by GitHub
commit e388c263b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 7 deletions

View File

@ -70,7 +70,7 @@ parts:
source: https://git.launchpad.net/curtin
source-type: git
source-commit: 64ea5fbe827aa98ddc63ea87de2de45689180c82
source-commit: 7c18bf6a24297ed465a341a1f53875b61c878d6b
override-pull: |
craftctl default

View File

@ -221,7 +221,7 @@ def bind(router, endpoint, controller, serializer=None, _depth=None):
async def make_server_at_path(socket_path, endpoint, controller, **kw):
app = web.Application(**kw)
bind(app.router, endpoint, controller)
runner = web.AppRunner(app)
runner = web.AppRunner(app, access_log=None)
await runner.setup()
site = web.UnixSite(runner, socket_path)
await site.start()

View File

@ -310,7 +310,8 @@ class NetworkController(BaseNetworkController, SubiquityController):
def _send_update(self, act, dev):
with self.context.child("_send_update", "{} {}".format(act.name, dev.name)):
log.debug("dev_info {} {}".format(dev.name, dev.config))
# disable log - can contain PSK
# log.debug("dev_info {} {}".format(dev.name, dev.config))
dev_info = dev.netdev_info()
self._call_clients("update_link", act, dev_info)

View File

@ -497,7 +497,7 @@ class SubiquityServer(Application):
bind(app.router, API.dry_run, DryRunController(self))
for controller in self.controllers.instances:
controller.add_routes(app)
runner = web.AppRunner(app, keepalive_timeout=0xFFFFFFFF)
runner = web.AppRunner(app, keepalive_timeout=0xFFFFFFFF, access_log=None)
await runner.setup()
await self.start_site(runner)

View File

@ -23,8 +23,8 @@ import tempfile
import yaml
_DEF_PERMS_FILE = 0o640
_DEF_GROUP = "adm"
_DEF_PERMS_FILE = 0o600
_DEF_GROUP = "root"
log = logging.getLogger("subiquitycore.file_util")

View File

@ -23,7 +23,7 @@ def setup_logger(dir, base="subiquity"):
os.makedirs(dir, exist_ok=True)
# Create the log directory in such a way that users in the group may
# write to this directory in the installation environment.
set_log_perms(dir, group_write=True)
set_log_perms(dir, mode=0o700)
logger = logging.getLogger("")
logger.setLevel(logging.DEBUG)