Skip to content
Browse files

MB-6716 Separate file for xdcr logs.

Change-Id: I61791b8ac17a4f96acc1fc9838e4752a274157c9
Reviewed-on: http://review.couchbase.org/21594
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
1 parent 6192216 commit dc0951220d9de393fc628e6e03cf83a789dbb04c @aartamonau aartamonau committed with Farshid Ghods Oct 12, 2012
Showing with 7 additions and 0 deletions.
  1. +1 −0 etc/static_config.in
  2. +1 −0 include/ns_common.hrl
  3. +5 −0 src/ns_server.erl
View
1 etc/static_config.in
@@ -19,3 +19,4 @@
{loglevel_cluster, debug}.
{loglevel_views, debug}.
{loglevel_mapreduce_errors, debug}.
+{loglevel_xdcr, debug}.
View
1 include/ns_common.hrl
@@ -55,6 +55,7 @@
-define(MAPREDUCE_ERRORS_LOG_FILENAME, "mapreduce_errors").
-define(COUCHDB_LOG_FILENAME, "couchdb").
-define(DEBUG_LOG_FILENAME, "debug").
+-define(XDCR_LOG_FILENAME, "xdcr").
-define(NS_SERVER_LOGGER, ns_server).
-define(COUCHDB_LOGGER, couchdb).
View
5 src/ns_server.erl
@@ -113,6 +113,7 @@ init_logging() ->
?MAPREDUCE_ERRORS_LOG_FILENAME),
CouchLogPath = filename:join(Dir, ?COUCHDB_LOG_FILENAME),
DebugLogPath = filename:join(Dir, ?DEBUG_LOG_FILENAME),
+ XdcrLogPath = filename:join(Dir, ?XDCR_LOG_FILENAME),
DiskSinkParams = [{size, {MaxB, MaxF}}],
@@ -121,6 +122,7 @@ init_logging() ->
ale:stop_sink(disk_views),
ale:stop_sink(disk_mapreduce_errors),
ale:stop_sink(disk_couchdb),
+ ale:stop_sink(disk_xdcr),
ale:stop_sink(ns_log),
lists:foreach(
@@ -141,6 +143,8 @@ init_logging() ->
ale_disk_sink, [CouchLogPath, DiskSinkParams]),
ok = ale:start_sink(disk_debug,
ale_disk_sink, [DebugLogPath, DiskSinkParams]),
+ ok = ale:start_sink(disk_xdcr,
+ ale_disk_sink, [XdcrLogPath, DiskSinkParams]),
ok = ale:start_sink(ns_log, raw, ns_log_sink, []),
lists:foreach(
@@ -177,6 +181,7 @@ init_logging() ->
ok = ale:add_sink(?MAPREDUCE_ERRORS_LOGGER, disk_mapreduce_errors),
ok = ale:add_sink(?COUCHDB_LOGGER, disk_couchdb),
+ ok = ale:add_sink(?XDCR_LOGGER, disk_xdcr, get_loglevel(?XDCR_LOGGER)),
case misc:get_env_default(dont_suppress_stderr_logger, false) of
true ->

0 comments on commit dc09512

Please sign in to comment.
Something went wrong with that request. Please try again.