diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Log scan lock failures that are not contention
Diffstat (limited to '')
-rw-r--r--source/cache.c14
1 file changed, 7 insertions, 7 deletions
diff --git a/source/cache.c b/source/cache.c
index 682f225..dd8ae7f 100644
--- a/source/cache.c
+++ b/source/cache.c
@@ -169,7 +169,7 @@ static int serve_slot(struct cache_slot *slot)
err = print_slot(slot);
if (err)
- log_error("[cgit] error printing cache %s: %s (%d)\n",
+ log_error("[cgit] Error printing slot %s: %s (%d)\n",
slot->path,
strerror(err),
err);
@@ -394,7 +394,7 @@ static int process_slot(struct cache_slot *slot)
// alternating visit. Nothing else makes that visible, because the
// cache keeps working and only quietly stops helping.
if (!err)
- log_error("[cgit] cache slot %s holds a different key, "
+ log_error("[cgit] Cache slot %s holds a different key, "
"consider a larger cache-size\n", slot->path);
// If any part of creating a slot fails the page is still rendered
@@ -402,14 +402,14 @@ static int process_slot(struct cache_slot *slot)
// because it did.
close_slot(slot);
if ((err = lock_slot(slot)) != 0) {
- log_error("[cgit] Unable to lock slot %s: %s (%d)\n",
+ log_error("[cgit] Error locking slot %s: %s (%d)\n",
slot->lock_path, strerror(err), err);
slot->fn();
return 0;
}
if ((err = fill_slot(slot)) != 0) {
- log_error("[cgit] Unable to fill slot %s: %s (%d)\n",
+ log_error("[cgit] Error filling slot %s: %s (%d)\n",
slot->lock_path, strerror(err), err);
unlock_slot(slot, 0);
close_lock(slot);
@@ -535,13 +535,13 @@ int cache_ls(const char *path)
int keylen;
if (!path) {
- log_error("[cgit] cache path not specified\n");
+ log_error("[cgit] Cache path not specified\n");
return -1;
}
dir = opendir(path);
if (!dir) {
err = errno;
- log_error("[cgit] unable to open path %s: %s (%d)\n",
+ log_error("[cgit] Error opening %s: %s (%d)\n",
path, strerror(err), err);
return err;
}
@@ -555,7 +555,7 @@ int cache_ls(const char *path)
strbuf_addstr(&slot_path, ent->d_name);
slot.path = slot_path.buf;
if ((err = open_slot(&slot)) != 0) {
- log_error("[cgit] unable to open path %s: %s (%d)\n",
+ log_error("[cgit] Error opening %s: %s (%d)\n",
slot_path.buf, strerror(err), err);
continue;
}