Skip to content

Commit

Permalink
Add separate logging file for app lifecycle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Sep 10, 2024
1 parent 57fb0c7 commit 127109f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middlewared/middlewared/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
logging.getLogger('docker.auth').setLevel(logging.ERROR)
logging.TRACE = 6

APP_LIFECYCLE_LOGFILE = '/var/log/app_lifecycle.log'
APP_MIGRATION_LOGFILE = '/var/log/app_migrations.log'
DOCKER_IMAGE_LOGFILE = '/var/log/docker_image.log'
FAILOVER_LOGFILE = '/var/log/failover.log'
Expand Down Expand Up @@ -83,6 +84,7 @@ def configure_logging(self, output_option: str):
else:
for name, filename, log_format in [
(None, LOGFILE, self.log_format),
('app_lifecycle', APP_LIFECYCLE_LOGFILE, self.log_format),
('app_migrations', APP_MIGRATION_LOGFILE, self.log_format),
('docker_image', DOCKER_IMAGE_LOGFILE, self.log_format),
('failover', FAILOVER_LOGFILE, self.log_format),
Expand Down

0 comments on commit 127109f

Please sign in to comment.