lokinet/llarp/net
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
..
address_info.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
address_info.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
exit_info.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
exit_info.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
ip.cpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
ip.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
ip_address.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
ip_address.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
ip_packet.cpp clean up ip packet code 2022-05-18 17:18:31 -04:00
ip_packet.hpp alignas 2022-05-18 18:02:57 -04:00
ip_range.cpp Crank oxen-mq to (1.2.)11; switch to oxen-encoding 2022-02-17 16:30:17 -04:00
ip_range.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
ip_range_map.hpp make comments with colins in them not have them in it 2022-02-17 18:01:53 -05:00
net.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
net.h standardize include format and pragma once 2021-03-09 19:01:41 -05:00
net.hpp set source ip on service nodes for outbound link to not use all interfaces 2022-05-27 13:26:30 -04:00
net_bits.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
net_if.hpp standardize include format and pragma once 2021-03-09 19:01:41 -05:00
net_int.cpp Replace llarp/util/endian.hpp with oxenc/endian.h 2022-04-28 12:09:51 -03:00
net_int.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
sock_addr.cpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
sock_addr.hpp Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
traffic_policy.cpp win32 fix 2021-04-19 07:03:56 -04:00
traffic_policy.hpp initial commit for #1595 2021-04-19 07:02:46 -04:00
uint128.hpp Replace llarp/util/endian.hpp with oxenc/endian.h 2022-04-28 12:09:51 -03:00