lokinet/llarp/util
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
..
logging Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
meta standardize include format and pragma once 2021-03-09 19:01:41 -05:00
thread Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
algorithm.hpp add forgotten file again 2021-04-19 07:02:44 -04:00
aligned.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
bencode.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
bencode.h standardize include format and pragma once 2021-03-09 19:01:41 -05:00
bencode.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
bits.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
buffer.cpp Replace llarp/util/endian.hpp with oxenc/endian.h 2022-04-28 12:09:51 -03:00
buffer.hpp more client to snode quic fixes 2021-04-19 07:02:44 -04:00
common.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
compare_ptr.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
copy_or_nullptr.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
decaying_hashset.hpp publish our rc out to the network when we regenerate them 2022-05-27 13:21:08 -04:00
decaying_hashtable.hpp Merge pull request #1541 from majestrate/lns-consensus-2021-02-19 2021-03-26 19:24:29 -04:00
formattable.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
fs.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
fs.hpp Update fs.hpp 2021-10-06 14:37:09 -04:00
json.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
json.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
logging.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
lokinet_init.c standardize include format and pragma once 2021-03-09 19:01:41 -05:00
lokinet_init.h standardize include format and pragma once 2021-03-09 19:01:41 -05:00
mem.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
mem.h standardize include format and pragma once 2021-03-09 19:01:41 -05:00
mem.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
printer.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
printer.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
priority_queue.hpp add util::ascending_priority_queue type 2022-05-02 15:27:08 -04:00
status.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
str.cpp Remove unneeded split(str, char) method 2021-08-11 00:26:52 -03:00
str.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
time.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
time.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
types.hpp add gossip info to systemd status 2022-05-27 13:21:08 -04:00