lokinet/llarp/dht
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).
2022-07-15 22:17:59 -03:00
..
messages replace LLARP_PROTO_VERSION macro 2022-05-28 13:18:43 -04:00
bucket.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
context.cpp separate white/grey list for active/decommissioned nodes. 2021-06-07 10:57:33 -04:00
context.hpp Replace ::Hash nested structs with std::hash specializations 2021-03-10 11:19:52 -04:00
dht.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
dht.h standardize include format and pragma once 2021-03-09 19:01:41 -05:00
explorenetworkjob.cpp Simplifications & C++17 2021-11-14 10:11:00 -04:00
explorenetworkjob.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
kademlia.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
key.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
localrouterlookup.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
localrouterlookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
localserviceaddresslookup.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
localserviceaddresslookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
localtaglookup.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
localtaglookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
message.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
message.hpp replace LLARP_PROTO_VERSION macro 2022-05-28 13:18:43 -04:00
node.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
publishservicejob.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
publishservicejob.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
recursiverouterlookup.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
recursiverouterlookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
serviceaddresslookup.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
serviceaddresslookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
taglookup.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
taglookup.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
tx.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
txholder.hpp Replace ::Hash nested structs with std::hash specializations 2021-03-10 11:19:52 -04:00
txowner.hpp Replace ::Hash nested structs with std::hash specializations 2021-03-10 11:19:52 -04:00