Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul of the Logging Infrastructure #1596

Open
wants to merge 60 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0293115
Pulled ostream operators for IPAddress and MacAddress into the namesp…
Dimi1010 Sep 20, 2024
45115e3
Refactor of Logger.
Dimi1010 Sep 30, 2024
dfb98c5
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Sep 30, 2024
9062c48
Cleanup and fixes.
Dimi1010 Sep 30, 2024
1e856f0
Added the new Off log level to the string conversion.
Dimi1010 Sep 30, 2024
02618fc
Fixed wrong variable name.
Dimi1010 Sep 30, 2024
32ff8f9
Added documentation to log source.
Dimi1010 Sep 30, 2024
12492d2
Lint.
Dimi1010 Sep 30, 2024
f21f85d
Fixed docstring for LogSource.
Dimi1010 Sep 30, 2024
0faf2e8
Fixed extra /
Dimi1010 Sep 30, 2024
ae72e81
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Oct 6, 2024
43d7b1c
Fixed explicit warning.
Dimi1010 Oct 6, 2024
87042f5
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Oct 14, 2024
be95ab8
Moved log functions inside logger.
Dimi1010 Oct 14, 2024
4b21a99
Revert "Moved log functions inside logger."
Dimi1010 Oct 14, 2024
00034e9
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Nov 5, 2024
b2055c0
Moved the log functions to the Logger class.
Dimi1010 Nov 5, 2024
cfc3d56
Merge branch 'dev' into refactor/log-templates
Dimi1010 Nov 14, 2024
ac2a383
Fixed typo in macro names.
Dimi1010 Nov 14, 2024
3776653
Changed value param to const-ref.
Dimi1010 Nov 14, 2024
76079a7
Added "venv" and "./out" to ignored directories by codespell.
Dimi1010 Nov 14, 2024
52b9007
Reverted to previous optimizations to keep executable binary size low.
Dimi1010 Nov 14, 2024
c71dd27
Fixed warnings about unreferenced local variables if the compile time…
Dimi1010 Nov 14, 2024
803c98a
Removed useless variable.
Dimi1010 Nov 14, 2024
9d44f76
Fixed friend class definition.
Dimi1010 Nov 14, 2024
af63a9b
Fixed variable assignment.
Dimi1010 Nov 14, 2024
02e717a
Added method useContextPooling to control if the logger should use co…
Dimi1010 Nov 16, 2024
3410231
Fixed more warnings about unreferenced local variables if the compile…
Dimi1010 Nov 16, 2024
379c074
Addressed warnings and documentation.
Dimi1010 Nov 16, 2024
bc82caf
Fixed include.
Dimi1010 Nov 16, 2024
69aa615
Fixed pointer dereference.
Dimi1010 Nov 20, 2024
17ec9a2
Fixed memory checker issues with logger.
Dimi1010 Nov 20, 2024
2029b4b
Lint
Dimi1010 Nov 20, 2024
c09a11a
Added mutex lock on the default log printer to support proper multi-t…
Dimi1010 Nov 20, 2024
f1b7cd6
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Dec 25, 2024
6b8c104
Fixed typos in documentation.
Dimi1010 Dec 25, 2024
e972e67
Changed level variable to private.
Dimi1010 Dec 25, 2024
85ae097
Changed LogPrinter definition to use the metaprogramming construct st…
Dimi1010 Dec 25, 2024
a1e7d56
Replaced C library includes with C++ equivalents.
Dimi1010 Dec 25, 2024
445197b
Updated documentation format.
Dimi1010 Dec 25, 2024
4c2e0cb
Added full namespace qualifier for marco code.
Dimi1010 Jan 1, 2025
d63b4da
Changed C-array to std::array.
Dimi1010 Jan 1, 2025
ced2eb9
Added a mutex lock when writing or reading to last error string to pr…
Dimi1010 Jan 1, 2025
8124585
Fixed object pool member variables.
Dimi1010 Jan 1, 2025
0831bcf
Added mutators to change the max size of an object pool at runtime.
Dimi1010 Jan 1, 2025
715f4d0
Added exception if pool preallocation size is larger then the maximum…
Dimi1010 Jan 1, 2025
b8ee9ed
Added tests for ObjectPool<T>.
Dimi1010 Jan 3, 2025
c42f637
Lint
Dimi1010 Jan 3, 2025
c630423
Added option to set the max pool size for the Logger context pool.
Dimi1010 Jan 3, 2025
1e5694c
Disabled logger context pooling in the tests as it is detected as a f…
Dimi1010 Jan 3, 2025
6da344c
Lint
Dimi1010 Jan 3, 2025
4e54f7a
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Jan 3, 2025
421a419
Lint
Dimi1010 Jan 3, 2025
6915e6a
Updated logger tests.
Dimi1010 Jan 3, 2025
cd3e361
Added tests for `shouldLog`.
Dimi1010 Jan 3, 2025
37a0f19
Moved iostream and iomanip to Logger.cpp as they are unnessesary in t…
Dimi1010 Jan 3, 2025
28d5e4f
Lint
Dimi1010 Jan 3, 2025
3d43dcb
Merge remote-tracking branch 'upstream/dev' into refactor/log-templates
Dimi1010 Jan 4, 2025
83e0dc3
Added iostream to examples that depended on transitively including io…
Dimi1010 Jan 4, 2025
117ff49
Added <iomanip> to examples that depended on transitively including f…
Dimi1010 Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
skip = *.dat,typos-config.toml,.git,.venv,./ci,./Dist,./mk,./Tests/ExamplesTest/expected_output,./Tests/ExamplesTest/pcap_examples,./Tests/Packet++Test/PacketExamples,./Tests/Pcap++Test/PcapExamples,./3rdParty,./Examples/PcapSearch/dirent-for-Visual-Studio
skip = *.dat,typos-config.toml,.git,.venv,venv,./out,./ci,./Dist,./mk,./Tests/ExamplesTest/expected_output,./Tests/ExamplesTest/pcap_examples,./Tests/Packet++Test/PacketExamples,./Tests/Pcap++Test/PcapExamples,./3rdParty,./Examples/PcapSearch/dirent-for-Visual-Studio
ignore-words = codespell-ignore-list.txt
count =
1 change: 1 addition & 0 deletions Common++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set(public_headers
header/Logger.h
header/LRUList.h
header/MacAddress.h
header/ObjectPool.h
header/OUILookup.h
header/PcapPlusPlusVersion.h
header/PointerVector.h
Expand Down
62 changes: 31 additions & 31 deletions Common++/header/IpAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -1082,40 +1082,40 @@ namespace pcpp
std::unique_ptr<IPv4Network> m_IPv4Network;
std::unique_ptr<IPv6Network> m_IPv6Network;
};
} // namespace pcpp

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv4Address& ipv4Address)
{
os << ipv4Address.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv4Address& ipv4Address)
{
os << ipv4Address.toString();
return os;
}

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv6Address& ipv6Address)
{
os << ipv6Address.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv6Address& ipv6Address)
{
os << ipv6Address.toString();
return os;
}

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPAddress& ipAddress)
{
os << ipAddress.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPAddress& ipAddress)
{
os << ipAddress.toString();
return os;
}

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv4Network& network)
{
os << network.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv4Network& network)
{
os << network.toString();
return os;
}

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv6Network& network)
{
os << network.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPv6Network& network)
{
os << network.toString();
return os;
}

inline std::ostream& operator<<(std::ostream& os, const pcpp::IPNetwork& network)
{
os << network.toString();
return os;
}
inline std::ostream& operator<<(std::ostream& os, const pcpp::IPNetwork& network)
{
os << network.toString();
return os;
}
} // namespace pcpp
Loading
Loading