commit d023807

default  ·  2022-12-04 05:40:17 +0000 UTC
parent bc0f9d1
Set default debug level to 1 for most object db functions.
1 files changed,  +8, -8
M data.c
M data.c
+8, -8
 1@@ -480,7 +480,7 @@ int _object_add(const char *id, d_char *obj, int ow)
 2 
 3     if (!ow && mtime(fn) > 0.0) {
 4         /* object already here */
 5-        srv_debug(0, xs_fmt("object_add object already here %s", id));
 6+        srv_debug(1, xs_fmt("object_add object already here %s", id));
 7         return 204; /* No content */
 8     }
 9 
10@@ -503,22 +503,22 @@ int _object_add(const char *id, d_char *obj, int ow)
11 
12             if (!index_in(c_idx, id)) {
13                 index_add(c_idx, id);
14-                srv_debug(0, xs_fmt("object_add added child %s to %s", id, c_idx));
15+                srv_debug(1, xs_fmt("object_add added child %s to %s", id, c_idx));
16             }
17             else
18-                srv_debug(0, xs_fmt("object_add %s child already in %s", id, c_idx));
19+                srv_debug(1, xs_fmt("object_add %s child already in %s", id, c_idx));
20 
21             /* create a one-element index with the parent */
22             xs *p_idx = xs_replace(fn, ".json", "_p.idx");
23             index_add(p_idx, in_reply_to);
24 
25-            srv_debug(0, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx));
26+            srv_debug(1, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx));
27         }
28     }
29     else
30         status = 500;
31 
32-    srv_debug(0, xs_fmt("object_add %s %s %d", id, fn, status));
33+    srv_debug(1, xs_fmt("object_add %s %s %d", id, fn, status));
34 
35     return status;
36 }
37@@ -555,12 +555,12 @@ int object_del_by_md5(const char *md5)
38 
39         p = files;
40         while (xs_list_iter(&p, &v)) {
41-            srv_debug(0, xs_fmt("object_del index %s", v));
42+            srv_debug(1, xs_fmt("object_del index %s", v));
43             unlink(v);
44         }
45     }
46 
47-    srv_debug(0, xs_fmt("object_del %s %d", fn, status));
48+    srv_debug(1, xs_fmt("object_del %s %d", fn, status));
49 
50     return status;
51 }
52@@ -636,7 +636,7 @@ int object_admire(const char *id, const char *actor, int like)
53     if (!index_in(fn, actor)) {
54         status = index_add(fn, actor);
55 
56-        srv_debug(0, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn));
57+        srv_debug(1, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn));
58     }
59 
60     return status;