Codebergdnkl
foot
master
1#pragma once
2#include <stdbool.h>
3#include <stdarg.h>
4#include "macros.h"
6enum log_colorize { LOG_COLORIZE_NEVER, LOG_COLORIZE_ALWAYS, LOG_COLORIZE_AUTO };
7enum log_facility { LOG_FACILITY_USER, LOG_FACILITY_DAEMON };
9enum log_class {
10 LOG_CLASS_NONE,
11 LOG_CLASS_ERROR,
12 LOG_CLASS_WARNING,
13 LOG_CLASS_INFO,
14 LOG_CLASS_DEBUG,
15 LOG_CLASS_COUNT,
16};
18void log_init(enum log_colorize colorize, bool do_syslog,
19 enum log_facility syslog_facility, enum log_class log_level);
20void log_deinit(void);
22void log_msg(
23 enum log_class log_class, const char *module,
24 const char *file, int lineno,
25 const char *fmt, ...) PRINTF(5);
27void log_errno(
28 enum log_class log_class, const char *module,
29 const char *file, int lineno,
30 const char *fmt, ...) PRINTF(5);
32void log_errno_provided(
33 enum log_class log_class, const char *module,
34 const char *file, int lineno, int _errno,
35 const char *fmt, ...) PRINTF(6);
37void log_msg_va(
38 enum log_class log_class, const char *module,
39 const char *file, int lineno, const char *fmt, va_list va) VPRINTF(5);
40void log_errno_va(
41 enum log_class log_class, const char *module,
42 const char *file, int lineno,
43 const char *fmt, va_list va) VPRINTF(5);
44void log_errno_provided_va(
45 enum log_class log_class, const char *module,
46 const char *file, int lineno, int _errno,
47 const char *fmt, va_list va) VPRINTF(6);
50int log_level_from_string(const char *str);
51const char *log_level_string_hint(void);
53#define LOG_ERR(...) \
54 log_msg(LOG_CLASS_ERROR, LOG_MODULE, __FILE__, __LINE__, __VA_ARGS__)
55#define LOG_ERRNO(...) \
56 log_errno(LOG_CLASS_ERROR, LOG_MODULE, __FILE__, __LINE__, __VA_ARGS__)
57#define LOG_ERRNO_P(_errno, ...) \
58 log_errno_provided(LOG_CLASS_ERROR, LOG_MODULE, __FILE__, __LINE__, \
59 _errno, __VA_ARGS__)
60#define LOG_WARN(...) \
61 log_msg(LOG_CLASS_WARNING, LOG_MODULE, __FILE__, __LINE__, __VA_ARGS__)
62#define LOG_INFO(...) \
63 log_msg(LOG_CLASS_INFO, LOG_MODULE, __FILE__, __LINE__, __VA_ARGS__)
65#if defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
66 #define LOG_DBG(...) \
67 log_msg(LOG_CLASS_DEBUG, LOG_MODULE, __FILE__, __LINE__, __VA_ARGS__)
68#else
69 #define LOG_DBG(...)
70#endif
Diagnostics5 git calls · 487 ms
CallStatusSizeTime0487 ms
discover200178 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=178 git.server.agent=git/2.56.1-Linux git.server.object_format=sha1 git.server.caps=agent ls-refs fetch server-option object-format git.server.fetch=shallow wait-for-done filter git.protocol.version=2 git.pkt.frames=9 git.pkt.data=7 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=178 git.pkt.payload.max=35
ls-refs20010 KiB462 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=398 git.response.bytes=10322 git.response.cache=EXPIRED git.response.duration_ms=462 git.protocol.version=2 git.pkt.frames=108 git.pkt.data=107 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=10322 git.pkt.payload.max=106 git.ls_refs.count=107 git.ls_refs.head=refs/heads/master
fetchtree:0 · deepen 102009.3 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=9489 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=9489 git.pkt.payload.max=9389 git.sideband.band1.bytes=9389 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=10 git.pack.bytes=9389 git.pack.ofs_delta=0 git.pack.ref_delta=0 git.pack.chain.max=0 git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a git.pack.full=10Open pack map
fetchcombine:blob:none+tree:2 · deepen 12008.6 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=8830 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=combine:blob:none+tree:2 git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=8830 git.pkt.payload.max=8730 git.sideband.band1.bytes=8730 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=14 git.pack.bytes=8730 git.fetch.wide.objects=14 git.fetch.wide.extra_bytes=9909 git.fetch.wide.blobs=0
fetch200633 B · hit22 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=22 git.response.bytes=633 git.response.cache=HIT git.response.duration_ms=22 git.fetch.wants=e499cf29eba12056a29716e92987027c1410115c git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=633 git.pkt.payload.max=606 git.sideband.band1.bytes=606 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://codeberg.org/dnkl/foot
- Ref
- refs/heads/master
- Commit
- c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
- cf-ray
- a5e25fa1ce1d224d
- Request
- 7cbc6482…
- Protocol
- v2 · sha1
- Agent
- git/2.56.1-Linux
- Filter
- advertised
- Fetch
- shallow wait-for-done filter
- Capabilities
- agent ls-refs fetch server-option object-format