When debugging problems from logs, it would be useful to know what
version is running across program start and stop. In one case I have
a suspicion that an upgrade was run inbetween but the logs don't help
identify that.
My first thought was to grab this from argparse just as --version
does, but that's not really currently possible [1].
The original starting message is probably irrelevant, but I realise
log messages tend to suffer from Hotel California syndrome; you can
check-in but you can never leave.
[1] http://bugs.python.org/issue9399
Change-Id: Ia1bfd2f3589b508e19fd8a94d59beaafd6d657d2
"""
import os
+import sys
from oslo.config import cfg
from oslo.db import options as db_options
product_name = "neutron"
logging.setup(product_name)
LOG.info(_LI("Logging enabled!"))
+ LOG.info(_LI("%(prog)s version %(version)s"),
+ {'prog': sys.argv[0],
+ 'version': version.version_info.release_string()})
+ LOG.debug("command line: %s" % " ".join(sys.argv))
def load_paste_app(app_name):