VENTI-LOG(3)
β¨ NAME β¨
okay bestie, welcome to VENTI-LOG(3) from the Library Functions Manual π this is the Venti logs page, and the whole squad is: VtLog, VtLogChunk, vtlog, vtlogclose, vtlogdump, vtlognames, vtlogopen, vtlogprint, vtlogremove, vtlogopen, ventilogging β literally all about Venti logs π
πΈ SYNOPSIS πΈ
#include <u.h>
#include <libc.h>
#include <venti.h>
VtLog* vtlogopen(char *name, uint size);
void vtlogprint(VtLog *log, char *fmt, ...);
void vtlogclose(VtLog *log);
void vtlog(char *name, char *fmt, ...);
void vtlogremove(char *name);
char** vtlognames(int *n);
void vtlogdump(int fd, VtLog *log);
extern int ventilogging; /* default 0 */
extern char *VtServerLog; /* "libventi/server" */
π DESCRIPTION π
okay so these routines give you an in-memory circular log structure β the Venti library and the Venti server use it to record events for debugging purposes. The logs are named by UTF strings β¨ lowkey iconic.
vtlogopenβ returns a reference to the log with the given name. If a log with that name does not exist and size is non-zero,vtlogopencreates a new log capable of holding at least size bytes and returns it.vtlogclosereleases the reference returned byvtlogopenπ«Άvtlogprintβ writes to log, which must be open.vtlogβ a convenient packaging ofvtlogopenfollowed byvtlogprintandvtlogcloseπvtlogremoveβ removes the log with the given name, freeing any associated storage.vtlognamesβ returns a list of the names of all the logs. The length of the list is returned in*n. The list should be freed by callingvtfreeon the returned pointer. The strings in the list will be freed by this call as well. (It is an error to callvtfreeon any of the strings in the list.) β οΈ no cap, that last bit matters.vtlogdumpβ prints log, which must be open, to the file descriptor fd.
If ventilogging is set to zero (the default), vtlognames and vtlogdump can inspect existing logs, but vtlogopen always returns nil and vtlog is a no-op. The other functions are no-ops when passed nil log structures π
The server library (see venti-conn(3) and venti-server(3)) writes debugging information to the log named VtServerLog, which defaults to the string libventi/server π
π SOURCE π
/src/libventi
π¦ SEE ALSO π¦
mwah π β this was VENTI-LOG(3) from the Library Functions Manual, source at /src/libventi, footer tag VENTI-LOG(3) and no date shown here, bestie. bye! π«Άβ¨
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms