Skip to content

Add a possibility to change service log path when supervisor is running as a windows service  #46

Description

@atm84a

Currently the location and name of Supervisor Windows service log is "hardcoded" in supervisor/services.py and is the same as location of a configuration file:

# The log goes to the location of the configuration file
if supervisor_conf is not None:
    config_dir = os.path.dirname(supervisor_conf)
else:  # or to python home
    config_dir = os.getcwd()

log_path = os.path.join(config_dir, self.slugify(self._svc_name_) + "-service.log")
hdl = logging.handlers.RotatingFileHandler(log_path,
                                           maxBytes=1024 ** 2,
                                           backupCount=3)

This way we have logs scattered in different places over filesystem w/o a possibility for bulk archiving.
It would be convenient to be able to configure Windows service log in supervisord.conf file along with the regular supervisor like below (service_logfile is a proposal):

[supervisord]
logfile = c:/logs/supervisord.log
service_logfile = c:/logs/supervisor-service.log 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions