commit 81d1f33a696dff16eb460f426af43da423947086
parent 804698c61d14ae727beb1500204c363337a746db
Author: lash <dev@holbrook.no>
Date: Wed, 5 Mar 2025 19:56:45 +0000
Add fd write to llog
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/llog/llog.c b/src/llog/llog.c
@@ -103,7 +103,7 @@ char *llog_new(enum lloglvl_e lvl, char *msg) {
return _llogbuf;
}
-char *llog_new_ns(enum lloglvl_e lvl, char *msg, char *ns) {
+char *llog_new_ns(enum lloglvl_e lvl, char *msg, const char *ns) {
char *p;
int c;
@@ -234,3 +234,7 @@ char* llog_add_b(const char *k, void *v, int l) {
return _llogbuf;
}
+
+char *llog_buf() {
+ return _llogbuf;
+}
diff --git a/src/llog/llog.h b/src/llog/llog.h
@@ -20,11 +20,13 @@ enum lloglvl_e {
};
char* llog_new(enum lloglvl_e lvl, char *msg);
-char* llog_new_ns(enum lloglvl_e lvl, char *msg, char *ns);
+char* llog_new_ns(enum lloglvl_e lvl, char *msg, const char *ns);
char* llog_add_s(const char *k, char *v);
char* llog_add_n(const char *k, long long v);
char* llog_add_x(const char *k, long long v);
char* llog_add_b(const char *k, void *v, int l);
-extern void llog_out(const char *v);
+char* llog_buf();
+extern int llog_out(char *v);
+extern void llog_out_fd(int fd);
#endif