Skip to content

Commit

Permalink
Merge "Allow sending logs to syslog" into R2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 16, 2015
2 parents a9b9785 + 3f0501f commit 5b19103
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/discovery/disc_server.py
Expand Up @@ -191,6 +191,7 @@ def __init__(self, args):
self._sandesh.set_logging_params(enable_local_log=self._args.log_local,
category=self._args.log_category,
level=self._args.log_level,
enable_syslog=args.use_syslog,
file=self._args.log_file)
self._sandesh.trace_buffer_create(name="dsHeartBeatTraceBuf",
size=1000)
Expand Down Expand Up @@ -1041,6 +1042,7 @@ def parse_args(args_str):
--cass_server_port 9160
--listen_ip_addr 127.0.0.1
--listen_port 5998
--use_syslog
--worker_id 1
'''

Expand Down Expand Up @@ -1079,6 +1081,7 @@ def parse_args(args_str):
'http_server_port': '5997',
'log_local': False,
'log_level': SandeshLevel.SYS_DEBUG,
'use_syslog': False,
'log_category': '',
'log_file': Sandesh._DEFAULT_LOG_FILE,
'worker_id': '0',
Expand Down Expand Up @@ -1160,6 +1163,9 @@ def parse_args(args_str):
parser.add_argument(
"--log_category",
help="Category filter for local logging of sandesh messages")
parser.add_argument(
"--use_syslog", action="store_true",
help="Use syslog for logging")
parser.add_argument("--log_file",
help="Filename for the logs to be written to")
parser.add_argument(
Expand Down

0 comments on commit 5b19103

Please sign in to comment.