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).
2022-07-15 22:17:59 -03:00
..
android standardize include format and pragma once 2021-03-09 19:01:41 -05:00
apple Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
config Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
consensus Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
constants macro removals 2022-05-30 09:06:48 -04:00
crypto Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
dht Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
dns Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
ev Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
exit Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
handlers Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
iwp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
link Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
messages Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
net Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
path Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
peerstats Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
quic Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
router Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
routing replace LLARP_PROTO_VERSION macro 2022-05-28 13:18:43 -04:00
rpc Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
service Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
simulation standardize include format and pragma once 2021-03-09 19:01:41 -05:00
tooling Rename isRouter -> isSNode 2021-04-19 06:58:36 -04:00
util Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
vpn Replace llarp/util/endian.hpp with oxenc/endian.h 2022-04-28 12:09:51 -03:00
win32 generate windows rc for each executable target so we can set the executable name right for each one 2022-05-30 09:06:48 -04:00
CMakeLists.txt Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
app.xml stray tag ;-; 2018-12-24 22:39:34 -06:00
bootstrap.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
bootstrap.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
context.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
endpoint_base.cpp add untracked file 2021-04-19 07:02:44 -04:00
endpoint_base.hpp Crank oxen-mq to (1.2.)11; switch to oxen-encoding 2022-02-17 16:30:17 -04:00
lokinet_shared.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
nodedb.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
nodedb.hpp liblokinet additions: 2021-04-19 06:59:07 -04:00
pow.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
pow.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
profiling.cpp far stricter profiling algorithm 2021-06-08 14:36:30 -04:00
profiling.hpp replace LLARP_PROTO_VERSION macro 2022-05-28 13:18:43 -04:00
router_contact.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
router_contact.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
router_id.cpp Crank oxen-mq to (1.2.)11; switch to oxen-encoding 2022-02-17 16:30:17 -04:00
router_id.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
router_version.cpp Cleanup: avoid pointless copy of `this` pointer 2021-11-15 13:38:00 -04:00
router_version.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00