Parano...:Buffer(3pm)

πŸ“¦
version 2.10 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Paranoid::Log::Buffer β€” Log Buffer Functions πŸ’–

okay bestie, so this is a page from the Perl world (the 3pm kind, aka a module page) and it's literally called Paranoid::Log::Buffer. It's giving "tiny but crucial". Let's get into it.


✨ VERSION ✨

$Id: lib/Paranoid/Log/Buffer.pm, 2.10 2022/03/08 00:01:04 acorliss $


🌸 SYNOPSIS 🌸

Like, here's how you'd actually touch this thing:

  use Paranoid::Log;

  startLogger('events', 'Buffer', PL_DEBUG, PL_GE);
  startLogger('crit-events', 'buffer', PL_CRIT, PL_EQ, { size => 100 });

  @messages = Paranoid::Log::Buffer::dumpBuffer($name);

πŸ¦‹ DESCRIPTION πŸ¦‹

So this module implements named buffers and they exist purely for logging purposes. That's the whole vibe. πŸ’…

Each buffer is a fixed length array of message records. And each one of those message records is a two-element array, where:

  1. element one = the message time, in UNIX epoch seconds ⏰
  2. element two = the message text itself πŸ“

Now listen: with the exception of the dumpBuffer function, this module is not meant to be used directly. Not even a little. Paranoid::Log should be your exclusive interface for logging, periodt. 🫢

When you're creating a named buffer with Paranoid::Log, you can specify a size option on a per-buffer basis. And the default size? It's 20. no cap.


🌈 OPTIONS 🌈

These are the options recognized for use in the options hash, bestie:

  • size β€” an integer, the number of entries to maintain in the buffer.

(for reference, here's the table as it was written:)

Option      Value       Description
-----------------------------------------------------
size        integer     number of entries to maintian
                        in buffer

🧚 SUBROUTINES/METHODS 🧚

NOTE: Given that this module is not intended to be used directly, nothing is exported.

init

logMsg

addLogger

delLogger

dumpBuffer

@entries = Paranoid::Log::Buffer::dumpBuffer($name);

This one dumps all the current entries in the named buffer. Iconic behavior honestly. Each entry is an array reference to a two-element array: first element is the timestamp of the message (in UNIX epoch seconds ⏰), second is the actual message itself πŸ’¬.


πŸ’œ DEPENDENCIES πŸ’œ

  • Paranoid::Debug

⭐ SEE ALSO ⭐

  • Paranoid::Log

πŸ’€ BUGS AND LIMITATIONS πŸ’€

(that's it. that's the section. it's empty. the silence is loud. πŸ™ˆ)


πŸ‘‘ AUTHOR πŸ‘‘

Arthur Corliss (corliss@digitalmages.com)


This software is free software. Similar to Perl, you can redistribute it and/or modify it under the terms of either:

  1. the GNU General Public License <https://www.gnu.org/licenses/gpl-1.0.html> as published by the Free Software Foundation <http://www.fsf.org/>; either version 1 <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
  2. the Artistic License 2.0 <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: No trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. However, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)


and that's the whole page, bestie 🫢 this was Parano...:Buffer(3pm) from perl v5.38.2, stamped 2024-03-07 β€” go forth and log responsibly βœ¨πŸ’–

πŸ“¦ where this page comes from