You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp
Jason Rhinelander b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2 years ago
..
android standardize include format and pragma once 3 years ago
apple Replace logging with oxen-logger 2 years ago
config Replace logging with oxen-logger 2 years ago
consensus Replace logging with oxen-logger 2 years ago
constants macro removals 2 years ago
crypto Replace logging with oxen-logger 2 years ago
dht Replace logging with oxen-logger 2 years ago
dns Replace logging with oxen-logger 2 years ago
ev Replace logging with oxen-logger 2 years ago
exit Replace logging with oxen-logger 2 years ago
handlers Replace logging with oxen-logger 2 years ago
iwp Replace logging with oxen-logger 2 years ago
link Replace logging with oxen-logger 2 years ago
messages Replace logging with oxen-logger 2 years ago
net Replace logging with oxen-logger 2 years ago
path Replace logging with oxen-logger 2 years ago
peerstats Replace logging with oxen-logger 2 years ago
quic Replace logging with oxen-logger 2 years ago
router Replace logging with oxen-logger 2 years ago
routing replace LLARP_PROTO_VERSION macro 2 years ago
rpc Replace logging with oxen-logger 2 years ago
service Replace logging with oxen-logger 2 years ago
simulation standardize include format and pragma once 3 years ago
tooling Rename isRouter -> isSNode 3 years ago
util Replace logging with oxen-logger 2 years ago
vpn Replace llarp/util/endian.hpp with oxenc/endian.h 2 years ago
win32 generate windows rc for each executable target so we can set the executable name right for each one 2 years ago
CMakeLists.txt Replace logging with oxen-logger 2 years ago
app.xml stray tag ;-; 5 years ago
bootstrap.cpp Replace logging with oxen-logger 2 years ago
bootstrap.hpp standardize include format and pragma once 3 years ago
context.cpp Replace logging with oxen-logger 2 years ago
endpoint_base.cpp add untracked file 3 years ago
endpoint_base.hpp Crank oxen-mq to (1.2.)11; switch to oxen-encoding 2 years ago
lokinet_shared.cpp Replace logging with oxen-logger 2 years ago
nodedb.cpp Replace logging with oxen-logger 2 years ago
nodedb.hpp liblokinet additions: 3 years ago
pow.cpp Replace logging with oxen-logger 2 years ago
pow.hpp Replace logging with oxen-logger 2 years ago
profiling.cpp far stricter profiling algorithm 3 years ago
profiling.hpp replace LLARP_PROTO_VERSION macro 2 years ago
router_contact.cpp Replace logging with oxen-logger 2 years ago
router_contact.hpp Replace logging with oxen-logger 2 years ago
router_id.cpp Crank oxen-mq to (1.2.)11; switch to oxen-encoding 2 years ago
router_id.hpp Replace logging with oxen-logger 2 years ago
router_version.cpp Cleanup: avoid pointless copy of `this` pointer 3 years ago
router_version.hpp Replace logging with oxen-logger 2 years ago