summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2014-05-04 21:53:03 +0200
committerLinus Nordberg <linus@nordu.net>2014-05-04 21:53:03 +0200
commit04750f39bbfb6dbbac704938263a0542c3de5403 (patch)
tree7ec25d68eca1c88aeb5f3f41ced6a83438a1df71
parent87757c2219744426a1d5c9c698e109c47ea892da (diff)
Limit the debug printing some.
-rw-r--r--src/plop.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plop.erl b/src/plop.erl
index 98e62af..1a80dea 100644
--- a/src/plop.erl
+++ b/src/plop.erl
@@ -125,8 +125,9 @@ do_add(TimestampedEntry = #timestamped_entry{entry = PlopEntry},
DB_hash = crypto:hash(sha256, serialise(PlopEntry)),
Record = db:find(DB_hash),
case Record of
- #plop{index = I, mtl = M = #mtl{entry = E}, spt = SPT} ->
- io:format("Found entry: index=~p~nMTL: ~p~nSPT: ~p~n", [I, M, SPT]),
+ #plop{index = I, mtl = #mtl{entry = E}, spt = SPT} ->
+ io:format("Found entry: index=~p, data=~p~n",
+ [I, E#timestamped_entry.entry#plop_entry.data]),
Record = Record#plop{ % DB consistency checking.
hash = DB_hash,
mtl = #mtl{entry =
@@ -138,8 +139,10 @@ do_add(TimestampedEntry = #timestamped_entry{entry = PlopEntry},
_ ->
NewSPT = spt(LogID, Privkey, TimestampedEntry),
MTL = #mtl{entry = TimestampedEntry},
- io:format("Creating new entry: index=~p~ndb hash: ~p~nMTL: ~p~nSPT: ~p~n",
- [ht:size(Tree) + 1, DB_hash, MTL, NewSPT]),
+ io:format("Creating new entry: index=~p,data=~p~n",
+ [ht:size(Tree) + 1, PlopEntry#plop_entry.data]),
+ %% io:format("Creating new entry: index=~p~ndb hash: ~p~nMTL: ~p~nSPT: ~p~n",
+ %% [ht:size(Tree) + 1, DB_hash, MTL, NewSPT]),
DB_data = #plop{index = ht:size(Tree) + 1,
hash = DB_hash,
mtl = MTL,