summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2022-12-04 06:40:17 +0100
committerGravatar default2022-12-04 06:40:17 +0100
commitd02380794297c6207f0fde73b7971cd7166aba97 (patch)
tree59c53b011c807a9fd1712b67e872941060481bae /data.c
parentDeleted debug code in html_entry(). (diff)
downloadsnac2-d02380794297c6207f0fde73b7971cd7166aba97.tar.gz
snac2-d02380794297c6207f0fde73b7971cd7166aba97.tar.xz
snac2-d02380794297c6207f0fde73b7971cd7166aba97.zip
Set default debug level to 1 for most object db functions.
Diffstat (limited to 'data.c')
-rw-r--r--data.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/data.c b/data.c
index 619acf5..86c45c8 100644
--- a/data.c
+++ b/data.c
@@ -480,7 +480,7 @@ int _object_add(const char *id, d_char *obj, int ow)
480 480
481 if (!ow && mtime(fn) > 0.0) { 481 if (!ow && mtime(fn) > 0.0) {
482 /* object already here */ 482 /* object already here */
483 srv_debug(0, xs_fmt("object_add object already here %s", id)); 483 srv_debug(1, xs_fmt("object_add object already here %s", id));
484 return 204; /* No content */ 484 return 204; /* No content */
485 } 485 }
486 486
@@ -503,22 +503,22 @@ int _object_add(const char *id, d_char *obj, int ow)
503 503
504 if (!index_in(c_idx, id)) { 504 if (!index_in(c_idx, id)) {
505 index_add(c_idx, id); 505 index_add(c_idx, id);
506 srv_debug(0, xs_fmt("object_add added child %s to %s", id, c_idx)); 506 srv_debug(1, xs_fmt("object_add added child %s to %s", id, c_idx));
507 } 507 }
508 else 508 else
509 srv_debug(0, xs_fmt("object_add %s child already in %s", id, c_idx)); 509 srv_debug(1, xs_fmt("object_add %s child already in %s", id, c_idx));
510 510
511 /* create a one-element index with the parent */ 511 /* create a one-element index with the parent */
512 xs *p_idx = xs_replace(fn, ".json", "_p.idx"); 512 xs *p_idx = xs_replace(fn, ".json", "_p.idx");
513 index_add(p_idx, in_reply_to); 513 index_add(p_idx, in_reply_to);
514 514
515 srv_debug(0, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx)); 515 srv_debug(1, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx));
516 } 516 }
517 } 517 }
518 else 518 else
519 status = 500; 519 status = 500;
520 520
521 srv_debug(0, xs_fmt("object_add %s %s %d", id, fn, status)); 521 srv_debug(1, xs_fmt("object_add %s %s %d", id, fn, status));
522 522
523 return status; 523 return status;
524} 524}
@@ -555,12 +555,12 @@ int object_del_by_md5(const char *md5)
555 555
556 p = files; 556 p = files;
557 while (xs_list_iter(&p, &v)) { 557 while (xs_list_iter(&p, &v)) {
558 srv_debug(0, xs_fmt("object_del index %s", v)); 558 srv_debug(1, xs_fmt("object_del index %s", v));
559 unlink(v); 559 unlink(v);
560 } 560 }
561 } 561 }
562 562
563 srv_debug(0, xs_fmt("object_del %s %d", fn, status)); 563 srv_debug(1, xs_fmt("object_del %s %d", fn, status));
564 564
565 return status; 565 return status;
566} 566}
@@ -636,7 +636,7 @@ int object_admire(const char *id, const char *actor, int like)
636 if (!index_in(fn, actor)) { 636 if (!index_in(fn, actor)) {
637 status = index_add(fn, actor); 637 status = index_add(fn, actor);
638 638
639 srv_debug(0, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn)); 639 srv_debug(1, xs_fmt("object_admire (%s) %s %s", like ? "Like" : "Announce", actor, fn));
640 } 640 }
641 641
642 return status; 642 return status;