record(3)
π record β Recorder Library (that's section 3, bestie) π
okay so you found the record(3) page in the Recorder Library and you're like "what do these three functions even do" β don't worry, I got you. this is the configure-your-output trio: record_configure_output, record_configure_show, and record_configure_format. they literally just tell the recorder where its words go and how they should look. that's it. that's the vibe. π
β¨ NAME β¨
record_configure_outputβ Configure recorder outputrecord_configure_showβ Configure recorder output functionrecord_configure_formatβ Configure recorder event formatting
πΈ SYNOPSIS πΈ
#include <recorder/recorder.h>
typedef unsigned (*recorder_show_fn) (const char *text,
size_tlen,
void *output);
typedef void (*recorder_format_fn)(recorder_show_fn show,
void *output,
const char * label,
const char *location,
uintptr_torder,
uintptr_ttimestamp,
const char *message);
void *recorder_configure_output(void *output);
recorder_show_fn recorder_configure_show(recorder_show_fnshow);
recorder_format_fn recorder_configure_format(recorder_format_fnformat);
π¦ DESCRIPTION π¦
so recorder_configure_output() configures the output for the recorder output function. the default output function just assumes that output is a FILE * and β plot twist β it uses stderr if it's NULL. π and since recorder tracing is often used for debugging, it may be a good idea to make the output non-buffered using:
setvbuf(output,NULL,_IONBF,0);
like, genuinely, do that. no cap. your debug output wants to be there now, not whenever the buffer feels like it. π
recorder_configure_show() configures the output function for the recorder. this output function receives the output value that you defined with recorder_configure_output. so they're besties, they pass stuff to each other, it's giving teamwork. π«Ά
recorder_configure_format() configures the event record formatting function. that's the one deciding how each event gets dressed up before it hits the output. π
β RETURN VALUE β
the functions return the previously configured value. so if you wanna put the old one back later, you absolutely can. main character foresight. π
π BUGS π
Bugs should be reported using https://github.com/c3d/recorder/issues. go tell them, don't just suffer in silence bestie π
π₯ SEE ALSO π₯
record(3),record_fast(3)RECORDER_DEFINE(3),RECORDER_DECLARE(3)recorder_trace_set(3),RECORDER_TRACE(3)recorder_dump(3),recorder_dump_for(3)
Additional documentation and tutorials can be found at https://github.com/c3d/recorder.
π AUTHOR π
Written by Christophe de Dinechin. king behaviour honestly π
and that's the whole page, babe β version 1.0, dated 2019-03-09, filed under record(3) in the Recorder Library. go configure something iconic β¨π
π¦ where this page comes from
- fedora 43: recorder-devel 1.2.2-12.fc43 Β· LGPLv2+
- fedora 43: recorder-devel 1.2.2-12.fc43 Β· LGPLv2+
- fedora 43: recorder-devel 1.2.2-13.fc43 Β· LGPLv2+
- fedora 43: recorder-devel 1.2.2-13.fc43 Β· LGPLv2+
- fedora 44: recorder-devel 1.2.3-.fc44 Β· LGPLv2+
- fedora 44: recorder-devel 1.2.3-.fc44 Β· LGPLv2+
- fedora 44: recorder-devel 1.2.3-.fc44.1 Β· LGPLv2+
- fedora 44: recorder-devel 1.2.3-.fc44.1 Β· LGPLv2+
- (C) 2019-2020 Christophe de Dinechin <christophe@dinechin.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms