summaryrefslogtreecommitdiff
path: root/src/perm.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/perm.erl')
-rw-r--r--src/perm.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/perm.erl b/src/perm.erl
index 614656a..0cbe6cb 100644
--- a/src/perm.erl
+++ b/src/perm.erl
@@ -56,19 +56,19 @@ ensurefile_nosync(Rootdir, Key, Content) ->
ensurefile(Rootdir, Key, Content, nosync).
ensurefile(Rootdir, Key, Content, Syncflag) ->
- lager:debug("dir ~p key ~p", [Rootdir, Key]),
+ lager:debug("dir ~p key ~s", [Rootdir, mochihex:to_hex(Key)]),
{Dirs, Path} = path_for_key(Rootdir, Key),
case readfile_and_verify(Path, Content) of
ok ->
- lager:debug("key ~p existed, fsync", [Key]),
+ lager:debug("key ~s existed, fsync", [mochihex:to_hex(Key)]),
ok = util:fsync([Path, Rootdir | Dirs]),
- lager:debug("key ~p fsynced", [Key]),
+ lager:debug("key ~s fsynced", [mochihex:to_hex(Key)]),
ok;
differ ->
- lager:debug("key ~p existed, was different", [Key]),
+ lager:debug("key ~s existed, was different", [mochihex:to_hex(Key)]),
differ;
{error, enoent} ->
- lager:debug("key ~p didn't exist, add", [Key]),
+ lager:debug("key ~s didn't exist, add", [mochihex:to_hex(Key)]),
util:check_error(make_dirs([Rootdir, Rootdir ++ "nursery/"]
++ Dirs),
makedir, "Error creating directory"),
@@ -77,9 +77,9 @@ ensurefile(Rootdir, Key, Content, Syncflag) ->
util:write_tempfile_and_rename(Path, NurseryName, Content),
case Syncflag of
sync ->
- lager:debug("key ~p added, fsync", [Key]),
+ lager:debug("key ~s added, fsync", [mochihex:to_hex(Key)]),
ok = util:fsync([Path, Rootdir | Dirs]),
- lager:debug("key ~p fsynced", [Key]),
+ lager:debug("key ~s fsynced", [mochihex:to_hex(Key)]),
ok;
nosync ->
ok