record(3)
π record(3) β the Recorder Library, bestie edition π
okay so you found yourself in the record(3) zone of the Recorder Library and honestly? iconic. this page is all about the three lil config functions that let you tell the recorder where to write stuff, how to write stuff, and how to make it look cute. sit down, grab a boba, we're doing this. π
The three stars of the show are record_configure_output, record_configure_show, and record_configure_format. Say hi. π
β¨ NAME β¨
record_configure_outputβ configures the recorder outputrecord_configure_showβ configures the recorder output functionrecord_configure_formatβ configures 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);
no cap, that's the whole cast. π«Ά
π DESCRIPTION π
recorder_configure_output() β where do the words go
this one sets the output for the recorder's output function. here's the tea: the default output function just assumes that output is a FILE *, and if you pass NULL it falls back to stderr. classic. π
and because recorder tracing is often a debugging thing β like, you're in the trenches, bestie β it might be a genuinely good idea to make that output non-buffered, like this:
setvbuf(output,NULL,_IONBF,0);
so it hits the screen immediately instead of ghosting you until the buffer decides to flush. π
recorder_configure_show() β who does the writing
this sets the output function for the recorder. and the way that works is: this output function receives the output value that you already defined with recorder_configure_output. they're a duo, they're a package deal, main character energy for both. π
recorder_configure_format() β how it looks
this one sets the event record formatting function. that's it, that's the vibe. β¨
β RETURN VALUE β
all three of them hand you back the previously configured value. so like, they're giving you receipts. keep them if you ever wanna restore the old setup. π
π BUGS π
found a bug? do NOT suffer in silence, bestie. report it here:
https://github.com/c3d/recorder/issues
we love a good bug report. πΈ
π 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)
and if you want additional documentation and tutorials, they live right here:
https://github.com/c3d/recorder
iykyk. go read them. π₯
π§ AUTHOR π§
Written by Christophe de Dinechin. king behavior fr fr. π
okay that's the whole page, you ate that. π
β¨ this was version 1.0, dated 2019-03-09, and yes it's the record(3) page from the Recorder Library β mwah, bye bestie! π¦ππ
π¦ 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