Skip to content

Commit

Permalink
Merge pull request #1825 from dbungert/log
Browse files Browse the repository at this point in the history
Log
  • Loading branch information
dbungert authored Oct 6, 2023
2 parents e55b5bf + ca8f1ca commit e388c26
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ parts:

source: https://git.launchpad.net/curtin
source-type: git
source-commit: 64ea5fbe827aa98ddc63ea87de2de45689180c82
source-commit: 7c18bf6a24297ed465a341a1f53875b61c878d6b

override-pull: |
craftctl default
Expand Down
2 changes: 1 addition & 1 deletion subiquity/common/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion subiquity/server/controllers/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ def update_has_default_route(self, has_default_route):

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)

Expand Down
2 changes: 1 addition & 1 deletion subiquity/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ async def start_api_server(self):
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)

Expand Down
4 changes: 2 additions & 2 deletions subiquitycore/file_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import yaml

_DEF_PERMS_FILE = 0o640
_DEF_GROUP = "adm"
_DEF_PERMS_FILE = 0o600
_DEF_GROUP = "root"

log = logging.getLogger("subiquitycore.file_util")

Expand Down
2 changes: 1 addition & 1 deletion subiquitycore/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e388c26

Please sign in to comment.