Soften log noise

This commit is contained in:
Martin Sumner 2019-05-11 13:26:07 +01:00
parent 9ab401c694
commit 486af59da1
4 changed files with 14 additions and 10 deletions

View file

@ -109,8 +109,8 @@
-define(CACHE_SIZE_JITTER, 25). -define(CACHE_SIZE_JITTER, 25).
-define(JOURNAL_SIZE_JITTER, 20). -define(JOURNAL_SIZE_JITTER, 20).
-define(ABSOLUTEMAX_JOURNALSIZE, 4000000000). -define(ABSOLUTEMAX_JOURNALSIZE, 4000000000).
-define(LONG_RUNNING, 200000). -define(LONG_RUNNING, 1000000).
% An individual task taking > 200ms gets a specific log % An individual task taking > 1s gets a specific log
-define(COMPRESSION_METHOD, lz4). -define(COMPRESSION_METHOD, lz4).
-define(COMPRESSION_POINT, on_receipt). -define(COMPRESSION_POINT, on_receipt).
-define(LOG_LEVEL, info). -define(LOG_LEVEL, info).

View file

@ -733,10 +733,14 @@ handle_cast({clerk_complete, ManifestSnippet, FilesToDelete}, State) ->
pending_removals=FilesToDelete, pending_removals=FilesToDelete,
compaction_pending=false}}; compaction_pending=false}};
handle_cast({release_snapshot, Snapshot}, State) -> handle_cast({release_snapshot, Snapshot}, State) ->
Rs = lists:keydelete(Snapshot, 1, State#state.registered_snapshots),
leveled_log:log("I0003", [Snapshot]), leveled_log:log("I0003", [Snapshot]),
case lists:keydelete(Snapshot, 1, State#state.registered_snapshots) of
[] ->
{noreply, State#state{registered_snapshots=[]}};
Rs ->
leveled_log:log("I0004", [length(Rs)]), leveled_log:log("I0004", [length(Rs)]),
{noreply, State#state{registered_snapshots=Rs}}; {noreply, State#state{registered_snapshots=Rs}}
end;
handle_cast({log_level, LogLevel}, State) -> handle_cast({log_level, LogLevel}, State) ->
INC = State#state.clerk, INC = State#state.clerk,
ok = leveled_iclerk:clerk_loglevel(INC, LogLevel), ok = leveled_iclerk:clerk_loglevel(INC, LogLevel),

View file

@ -56,7 +56,7 @@
{"B0008", {"B0008",
{info, "Bucket list finds no more results"}}, {info, "Bucket list finds no more results"}},
{"B0009", {"B0009",
{info, "Bucket list finds Bucket ~w"}}, {debug, "Bucket list finds Bucket ~w"}},
{"B0011", {"B0011",
{warn, "Call to destroy the store and so all files to be removed"}}, {warn, "Call to destroy the store and so all files to be removed"}},
{"B0013", {"B0013",
@ -191,7 +191,7 @@
{"PC006", {"PC006",
{debug, "Work prompted but none needed"}}, {debug, "Work prompted but none needed"}},
{"PC007", {"PC007",
{info, "Clerk prompting Penciller regarding manifest change"}}, {debug, "Clerk prompting Penciller regarding manifest change"}},
{"PC008", {"PC008",
{info, "Merge from level ~w to merge into ~w files below"}}, {info, "Merge from level ~w to merge into ~w files below"}},
{"PC009", {"PC009",
@ -269,9 +269,9 @@
{info, "Unexpected failure to fetch value for Key=~w SQN=~w " {info, "Unexpected failure to fetch value for Key=~w SQN=~w "
++ "with reason ~w"}}, ++ "with reason ~w"}},
{"I0002", {"I0002",
{info, "Journal snapshot ~w registered at SQN ~w"}}, {debug, "Journal snapshot ~w registered at SQN ~w"}},
{"I0003", {"I0003",
{info, "Journal snapshot ~w released"}}, {debug, "Journal snapshot ~w released"}},
{"I0004", {"I0004",
{info, "Remaining number of journal snapshots is ~w"}}, {info, "Remaining number of journal snapshots is ~w"}},
{"I0005", {"I0005",

View file

@ -234,7 +234,7 @@
-define(PROMPT_WAIT_ONL0, 5). -define(PROMPT_WAIT_ONL0, 5).
-define(WORKQUEUE_BACKLOG_TOLERANCE, 4). -define(WORKQUEUE_BACKLOG_TOLERANCE, 4).
-define(COIN_SIDECOUNT, 5). -define(COIN_SIDECOUNT, 5).
-define(SLOW_FETCH, 100000). -define(SLOW_FETCH, 500000). % Log a very slow fetch - longer than 500ms
-define(ITERATOR_SCANWIDTH, 4). -define(ITERATOR_SCANWIDTH, 4).
-define(TIMING_SAMPLECOUNTDOWN, 10000). -define(TIMING_SAMPLECOUNTDOWN, 10000).
-define(TIMING_SAMPLESIZE, 100). -define(TIMING_SAMPLESIZE, 100).