FBB::level(3bobcat)
π¦ FBB::level β the log-level setter, bestie edition
okay so this is FBB::level(3bobcat), a manual page from section 3bobcat (that's the bobcat library's C++ API section, iykyk). It's about a cute lil manipulator that tells FBB::Log objects how loud to be. Let's get into it π
β¨ NAME β¨
FBB::level β the manipulator that sets the log-level of FBB::Log objects. periodt.
πΈ SYNOPSIS πΈ
#include <bobcat/level>
Linking option: -lbobcat
π DESCRIPTION π
okay so an FBB::level object is the thing you use to specify the insertion forces of info that gets inserted into FBB::Log objects. The way that it works: when you insert a level into a Log object, it defines the force of every insertion (or write call) that comes after it into that Log object. no cap.
Conversely (flip side, bestie), Log objects can set their own insertion resistances through their setLevel members. So here's the vibe check: if the level's force is equal to or exceeds the Log object's resistance, then the insertion happens. If not? The insertion is justβ¦ ignored. π
A single insertion statement can contain multiple level calls, and if it does, then each level call updates the force of the insertions that follow that level call. so they stack up as you go, one after another. iconic behaviour honestly.
By default, insertions into Log objects that are not preceded by level insertions are completed. (default = you get your message, no drama.)
And heads up: when a level object gets inserted into another kind of std::ostream object β literally anything that isn't a Log β the level object performs no actions. It's like it's not even there. silent. main character who says nothing.
π NAMESPACE π
FBB
All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB. everyone lives in the same house fr fr π«Ά
π INHERITS FROM π
-
(yeah, nothing. it inherits from nothing. it's self-made.)
π CONSTRUCTORS π
level(size_t force)β this constructor is used in insertion statements, usually by inserting it as an anonymous object into anFBB::Logobject. that's the classic move.
Copy and move constructors (and assignment operators) are available. β
π OVERLOADED OPERATOR π
std::ostream &::operator<<(std::ostream &ostr, FBB::level const &force)β ifostrcan be downcasted to anFBB::Logobject, then subsequent insertions are performed ifforceexceeds theLogobject'sresistanceas specified by itssetLevelmember. Ifostrdoes not actually refer to aLogobject, thenostris returned without any further action, andostrhandles subsequent insertions in its default way. (it just goes back to doing its own thing. live and let live.)
π₯ EXAMPLE π₯
okay this is the whole thing, verbatim, don't skip it bestie:
#include <iostream>
#include <iomanip>
#include <bobcat/log>
#include <bobcat/level>
using namespace std;
using namespace FBB;
int main()
{
// Log &log = Log::initialize("&1"); // uses the static Log object
Log log; // explicitly defining a Log object
// log.open("/tmp/out"); // or at once: Log log{ "/tmp/out" }
log << "This message is written to cout" << nl <<
setw(16) << β β << "occupying multiple lines\n";
log.off();
log << "This message is not shown\n";
log << "This message is not shown\n";
log << fnl;
log << "This message is not shown\n";
log.on(2);
log << "This message is shown\n";
log << level(0) << "not shown" << level(2) << "shown at level 2\n";
log << level(3) << "at level(3)" << level(1) << "not shown" << fnl;
log << "separate new line\n";
log << level(2) << "in business again\n";
log << "final line\n";
log.str("ab");
log(βaβ) << "hello a!" << endl;
log(βbβ) << "hello b!" << nl <<
setw(16) << β β << "so far, so good" << endl;
log << "not shown" << endl;
log(βcβ) << "not shown\n";
log << "not shown\n";
log.setLevel(2);
log << level(2) << "in business again\n";
}
π FILES π
bobcat/level β defines the class interface. that's where the magic lives.
π§ SEE ALSO π§
go read those too, they're the besties of this page π
π BUGS π
None Reported.
(read: nobody found anything. slay.)
β BOBCAT PROJECT FILES β
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
libbobcat6: debian package containing the shared library, changelog and copyright note;libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
πΈ BOBCAT πΈ
Bobcat is an acronym of `Brokkenβs Own Base Classes And Templates'. cute name, honestly. it's giving acronym royalty π
π COPYRIGHT π
This is free software, distributed under the terms of the GNU General Public License (GPL). free as in freedom, bestie, go wild π«Ά
π AUTHOR π
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page!! π
this was from libbobcat-dev_6.15.01, dated 2005-2026, and it's the FBB::level(3bobcat) page itself. stay logged, stay levelled, mwah ππ
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms