Skip to content
Snippets Groups Projects
Commit ff3781ff authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Always log the version of Flamenco Manager.

parent bdd50d6a
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
This file logs the changes that are actually interesting to users (new features, This file logs the changes that are actually interesting to users (new features,
changed functionality, fixed bugs). changed functionality, fixed bugs).
## Version 2.1.1 (in development)
- Always log the version of Flamenco Manager.
## Version 2.1.0 (2018-01-04) ## Version 2.1.0 (2018-01-04)
- Python 3.5.4 is required as minimum Python version. - Python 3.5.4 is required as minimum Python version.
......
...@@ -48,6 +48,8 @@ def main(): ...@@ -48,6 +48,8 @@ def main():
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
log.debug('Starting, pid=%d', os.getpid()) log.debug('Starting, pid=%d', os.getpid())
log_startup()
if args.test: if args.test:
log.warning('Test mode enabled, overriding task_types=%r', log.warning('Test mode enabled, overriding task_types=%r',
confparser.value('task_types')) confparser.value('task_types'))
...@@ -260,5 +262,19 @@ def construct_asyncio_loop() -> asyncio.AbstractEventLoop: ...@@ -260,5 +262,19 @@ def construct_asyncio_loop() -> asyncio.AbstractEventLoop:
return loop 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__': if __name__ == '__main__':
main() main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment