1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/external
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
..
cpr@aac5058a15 lokinet-bootstrap native binary 2021-04-15 13:39:45 -04:00
cxxopts@6fa46a7488 Revert "bump submodules" 2020-07-02 11:13:30 -04:00
ghc-filesystem@2a8b380f8d Update submodules and static build deps 2021-04-20 19:58:11 -03:00
ngtcp2@026b8434eb bump ngtcp2 to v0.1.0 tag 2022-01-31 13:05:03 -05:00
nlohmann@db78ac1d77 Update nlohmann to latest stable 2020-08-28 11:03:43 -03:00
oxen-encoding@79193e58fb bump verions of all deps 2022-05-30 17:08:08 -03:00
oxen-logging@0fc1b3528a Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00
oxen-mq@eadb37c765 bump verions of all deps 2022-05-30 17:08:08 -03:00
pybind11@8de7772cc7 Update submodules and static build deps 2021-04-20 19:58:11 -03:00
sqlite_orm@4c6a46bd4d Update submodules and static build deps 2021-04-20 19:58:11 -03:00
uvw@36fdf810a6 Reformat with clang-format-11 2021-03-05 13:36:31 -04:00
CMakeLists.txt Replace logging with oxen-logger 2022-07-15 22:17:59 -03:00