CppLogging
1.0.4.0
C++ Logging Library
|
Hash layout. More...
#include <hash_layout.h>
Public Member Functions | |
HashLayout ()=default | |
HashLayout (const HashLayout &)=delete | |
HashLayout (HashLayout &&)=delete | |
virtual | ~HashLayout ()=default |
HashLayout & | operator= (const HashLayout &)=delete |
HashLayout & | operator= (HashLayout &&)=delete |
void | LayoutRecord (Record &record) override |
Layout the given logging record into a raw buffer. More... | |
Public Member Functions inherited from CppLogging::Element | |
virtual bool | IsStarted () const noexcept |
Is the logging element started? More... | |
virtual bool | Start () |
Start the logging element. More... | |
virtual bool | Stop () |
Stop the logging element. More... | |
Static Public Member Functions | |
static uint32_t | Hash (std::string_view message) |
Hash the given string message using FNV-1a hashing algorithm. More... | |
Hash layout.
Hash layout performs simple memory copy operation to convert the given logging record into the plane raw buffer. Logging message is stored as a 32-bit hash of the message string.
Hash algorithm is 32-bit FNV-1a string hashing.
Thread-safe.
Definition at line 26 of file hash_layout.h.
|
default |
|
delete |
|
delete |
|
virtualdefault |
|
static |
Hash the given string message using FNV-1a hashing algorithm.
FNV-1a string hashing is the fast non-cryptographic hash function created by Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo.
https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
message | - Message string |
Definition at line 16 of file hash_layout.cpp.
|
overridevirtual |
Layout the given logging record into a raw buffer.
This method will update the raw filed of the given logging record.
record | - Logging record |
Implements CppLogging::Layout.
Definition at line 30 of file hash_layout.cpp.
|
delete |
|
delete |