Don't enforce foreground with -d switch
We have a separate switch in place to enforce running in foreground so it's time to decouple debug logging from running in foreground. Change-Id: I5ad1138b0054786686a8b22aece1a473be88eee0
This commit is contained in:
parent
0022884dc2
commit
31d212b72a
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The -d switch doesn't enforce foreground anymore. It only enables debug
|
||||
logging. To start zuul in foreground please add the -f switch instead.
|
|
@ -121,10 +121,7 @@ class ZuulApp(object):
|
|||
parser = self.createParser()
|
||||
self.args = parser.parse_args(args)
|
||||
|
||||
# The arguments debug and foreground both lead to nodaemon mode so
|
||||
# set nodaemon if one of them is set.
|
||||
if ((hasattr(self.args, 'debug') and self.args.debug) or
|
||||
(hasattr(self.args, 'foreground') and self.args.foreground)):
|
||||
if hasattr(self.args, 'foreground') and self.args.foreground:
|
||||
self.args.nodaemon = True
|
||||
else:
|
||||
self.args.nodaemon = False
|
||||
|
@ -174,13 +171,9 @@ class ZuulDaemonApp(ZuulApp, metaclass=abc.ABCMeta):
|
|||
def createParser(self):
|
||||
parser = super(ZuulDaemonApp, self).createParser()
|
||||
parser.add_argument('-d', dest='debug', action='store_true',
|
||||
help='run in foreground with debug log. Note '
|
||||
'that in future this will be changed to only '
|
||||
'request debug logging. If you want to keep '
|
||||
'running the process in the foreground '
|
||||
'migrate/add the -f switch.')
|
||||
help='enable debug log')
|
||||
parser.add_argument('-f', dest='foreground', action='store_true',
|
||||
help='run in foreground with info log')
|
||||
help='run in foreground')
|
||||
return parser
|
||||
|
||||
def getPidFile(self):
|
||||
|
|
Loading…
Reference in New Issue