diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2014-08-17 16:07:02 -0500 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2014-08-17 16:07:02 -0500 |
commit | 81b56f73e07ed2d19bcf17730fd531562a5e0895 (patch) | |
tree | 8e76eb59d22051da353930e9939798518b5087dd | |
parent | e7e89bf9c58fb56e25ab2d13e8c9c37765d628ca (diff) | |
download | couchdb-81b56f73e07ed2d19bcf17730fd531562a5e0895.tar.gz |
Repace twig with couch_log
-rw-r--r-- | src/custodian/src/custodian.app.src | 2 | ||||
-rw-r--r-- | src/custodian/src/custodian_db_checker.erl | 6 | ||||
-rw-r--r-- | src/custodian/src/custodian_server.erl | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/custodian/src/custodian.app.src b/src/custodian/src/custodian.app.src index ff35a99c7..c5b4f6986 100644 --- a/src/custodian/src/custodian.app.src +++ b/src/custodian/src/custodian.app.src @@ -8,10 +8,10 @@ {applications, [ kernel, stdlib, + couch_log, config, couch_event, couch, - twig, mem3 ]}, {mod, { custodian_app, []}}, diff --git a/src/custodian/src/custodian_db_checker.erl b/src/custodian/src/custodian_db_checker.erl index 57487916b..5f1bbe7d5 100644 --- a/src/custodian/src/custodian_db_checker.erl +++ b/src/custodian/src/custodian_db_checker.erl @@ -63,7 +63,7 @@ handle_info({'EXIT', Pid, normal}, #st{checker=Pid}=St) -> {noreply, St#st{checker=undefined}}; handle_info({'EXIT', Pid, Reason}, #st{checker=Pid}=St) -> - twig:log(notice, "custodian db checker died ~p", [Reason]), + couch_log:notice("custodian db checker died ~p", [Reason]), {noreply, restart_checker(St#st{checker=undefined})}; handle_info(Msg, St) -> @@ -138,7 +138,7 @@ get_stats_db() -> send_missing_db_alert(DbName) -> - twig:log(notice, "Missing system database ~s", [DbName]), + couch_log:notice("Missing system database ~s", [DbName]), Command = [ "send-sensu-event --standalone --critical", " --output=\"Missing system database ", @@ -147,7 +147,7 @@ send_missing_db_alert(DbName) -> os:cmd(lists:concat(Command)). clear_missing_dbs_alert() -> - twig:log(notice, "All system databases exist.", []), + couch_log:notice("All system databases exist.", []), Command = [ "send-sensu-event --standalone --ok", " --output=\"All system databases exist\"", diff --git a/src/custodian/src/custodian_server.erl b/src/custodian/src/custodian_server.erl index b9dabe774..e825c07f5 100644 --- a/src/custodian/src/custodian_server.erl +++ b/src/custodian/src/custodian_server.erl @@ -81,12 +81,12 @@ handle_info({'EXIT', Pid, normal}, #state{shard_checker=Pid}=State) -> end; handle_info({'EXIT', Pid, Reason}, #state{shard_checker=Pid}=State) -> - twig:log(notice, "custodian shard checker died ~p", [Reason]), + couch_log:notice("custodian shard checker died ~p", [Reason]), NewState = State#state{shard_checker=undefined}, {noreply, start_shard_checker(NewState)}; handle_info({'EXIT', Pid, Reason}, #state{event_listener=Pid}=State) -> - twig:log(notice, "custodian update notifier died ~p", [Reason]), + couch_log:notice("custodian update notifier died ~p", [Reason]), {ok, Pid1} = start_event_listener(), {noreply, State#state{event_listener=Pid1}}. @@ -132,10 +132,10 @@ send_sensu_event({_, Count} = Item) -> 0 -> "--ok"; 1 -> - twig:log(crit, "~s", [describe(Item)]), + couch_log:critical("~s", [describe(Item)]), "--critical"; _ -> - twig:log(warn, "~s", [describe(Item)]), + couch_log:warning("~s", [describe(Item)]), "--warning" end, Cmd = lists:concat([ |