Commit Graph

24 Commits (dev)

Author SHA1 Message Date
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).
2 years ago
Jeff Becker e2cd4d66cc docstring update 2 years ago
Jeff Becker 94ce7a9af7 make function pointer arguments named 2 years ago
Jeff Becker ef19111f88 dont pack struct becuase alignment 2 years ago
Jeff Becker 65b29a1b70 add liblokinet custom logger 2 years ago
Jeff Becker ba57ab04aa wire up liblokient_udp_* 2 years ago
Jeff Becker 1c70b0f42f add lokinet_hex_to_base32z 2 years ago
Jeff Becker d3d07fe53e typofix 2 years ago
Jeff Becker e11e736ea5 typofix 2 years ago
Jeff Becker 71364da9f4 fix typos add lokinet_udp_close 2 years ago
Jeff Becker 9fb11bf3da typo fixes and clarify docs 2 years ago
Jeff Becker 13c3786067 correct function names 2 years ago
Jeff Becker 00075f541b fix compile error 2 years ago
Jeff Becker db7050cd2d update liblokinet udp header 2 years ago
Jeff Becker 50001da9a1 remove dead shit from header 2 years ago
Jeff Becker 433febe5c6 update liblokinet udp api header 2 years ago
Jeff Becker 5f49d3a49f update header with notes 2 years ago
Jeff Becker 046ab3d453
export functions in liblokinet for win32 dll 3 years ago
Jeff Becker 83b0f25075
cleanup after rebase 3 years ago
Jeff Becker f63122272d
fix some compiler errors 3 years ago
Jeff Becker 545021aa3d
temp commit 3 years ago
Jeff Becker 3d76e3d4bd
split up liblokinet headers 3 years ago
Jeff Becker 9c2ff92168 remove lokinet header for now 6 years ago
Jeff Becker 19e3b9c642 * more hidden service code
* begin lokinet api
6 years ago