Always log the version of Flamenco Manager.

This commit is contained in:
2018-02-13 17:22:24 +01:00
parent bdd50d6a3e
commit ff3781ff73
2 changed files with 21 additions and 0 deletions

View File

@@ -3,6 +3,11 @@
This file logs the changes that are actually interesting to users (new features,
changed functionality, fixed bugs).
## Version 2.1.1 (in development)
- Always log the version of Flamenco Manager.
## Version 2.1.0 (2018-01-04)
- Python 3.5.4 is required as minimum Python version.

View File

@@ -48,6 +48,8 @@ def main():
log = logging.getLogger(__name__)
log.debug('Starting, pid=%d', os.getpid())
log_startup()
if args.test:
log.warning('Test mode enabled, overriding task_types=%r',
confparser.value('task_types'))
@@ -260,5 +262,19 @@ def construct_asyncio_loop() -> asyncio.AbstractEventLoop:
return loop
def log_startup():
"""Log the version of Flamenco Worker."""
from . import __version__
log = logging.getLogger(__name__)
old_level = log.level
try:
log.setLevel(logging.INFO)
log.info('Starting Flamenco Worker %s', __version__)
finally:
log.setLevel(old_level)
if __name__ == '__main__':
main()