Commit 23d567bc authored by Marco Mariani's avatar Marco Mariani

always log to console

parent 96045b33
...@@ -57,16 +57,12 @@ class ProxyConfig(object): ...@@ -57,16 +57,12 @@ class ProxyConfig(object):
# set up logging # set up logging
self.logger = logging.getLogger("slapproxy") self.logger = logging.getLogger("slapproxy")
self.logger.setLevel(logging.INFO) self.logger.setLevel(logging.INFO)
if self.console: self.logger.addHandler(logging.StreamHandler())
# XXX shouldn't this be default?
self.logger.addHandler(logging.StreamHandler())
if not self.database_uri: if not self.database_uri:
raise ValueError('database-uri is required.') raise ValueError('database-uri is required.')
if self.log_file: if self.log_file:
if not os.path.isdir(os.path.dirname(self.log_file)): if not os.path.isdir(os.path.dirname(self.log_file)):
# fallback to console only if directory for logs does not exists and
# continue to run
raise ValueError('Please create directory %r to store %r log file' % ( raise ValueError('Please create directory %r to store %r log file' % (
os.path.dirname(self.log_file), self.log_file)) os.path.dirname(self.log_file), self.log_file))
else: else:
...@@ -98,7 +94,7 @@ def main(): ...@@ -98,7 +94,7 @@ def main():
action='store_true', action='store_true',
help='Verbose output.') help='Verbose output.')
# XXX shouldn't this be deprecated? # XXX not used anymore, deprecated
ap.add_argument('-c', '--console', ap.add_argument('-c', '--console',
action='store_true', action='store_true',
help='Console output.') help='Console output.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment