CppLogging  1.0.4.0
C++ Logging Library
hash_layout.h
Go to the documentation of this file.
1 
9 #ifndef CPPLOGGING_LAYOUTS_HASH_LAYOUT_H
10 #define CPPLOGGING_LAYOUTS_HASH_LAYOUT_H
11 
12 #include "logging/layout.h"
13 
14 namespace CppLogging {
15 
17 
26 class HashLayout : public Layout
27 {
28 public:
29  HashLayout() = default;
30  HashLayout(const HashLayout&) = delete;
31  HashLayout(HashLayout&&) = delete;
32  virtual ~HashLayout() = default;
33 
34  HashLayout& operator=(const HashLayout&) = delete;
36 
38 
47  static uint32_t Hash(std::string_view message);
48 
49  // Implementation of Layout
50  void LayoutRecord(Record& record) override;
51 };
52 
53 } // namespace CppLogging
54 
55 #endif // CPPLOGGING_LAYOUTS_HASH_LAYOUT_H
HashLayout & operator=(HashLayout &&)=delete
HashLayout(HashLayout &&)=delete
static uint32_t Hash(std::string_view message)
Hash the given string message using FNV-1a hashing algorithm.
Definition: hash_layout.cpp:16
HashLayout & operator=(const HashLayout &)=delete
HashLayout(const HashLayout &)=delete
virtual ~HashLayout()=default
void LayoutRecord(Record &record) override
Layout the given logging record into a raw buffer.
Definition: hash_layout.cpp:30
Logging layout interface.
Definition: layout.h:28
Logging record.
Definition: record.h:37
Logging layout interface definition.
C++ Logging project definitions.
Definition: appender.h:15