1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

24 commits

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).
2022-07-15 22:17:59 -03:00
Jeff Becker e2cd4d66cc docstring update 2022-01-31 10:53:48 -05:00
Jeff Becker 94ce7a9af7 make function pointer arguments named 2022-01-31 10:53:48 -05:00
Jeff Becker ef19111f88 dont pack struct becuase alignment 2022-01-31 10:53:48 -05:00
Jeff Becker 65b29a1b70 add liblokinet custom logger 2022-01-31 10:53:48 -05:00
Jeff Becker ba57ab04aa wire up liblokient_udp_* 2022-01-31 10:53:48 -05:00
Jeff Becker 1c70b0f42f add lokinet_hex_to_base32z 2022-01-31 10:53:48 -05:00
Jeff Becker d3d07fe53e typofix 2022-01-31 10:53:48 -05:00
Jeff Becker e11e736ea5 typofix 2022-01-31 10:53:48 -05:00
Jeff Becker 71364da9f4 fix typos add lokinet_udp_close 2022-01-31 10:53:48 -05:00
Jeff Becker 9fb11bf3da typo fixes and clarify docs 2022-01-31 10:53:48 -05:00
Jeff Becker 13c3786067 correct function names 2022-01-31 10:53:48 -05:00
Jeff Becker 00075f541b fix compile error 2022-01-31 10:53:48 -05:00
Jeff Becker db7050cd2d update liblokinet udp header 2022-01-31 10:53:48 -05:00
Jeff Becker 50001da9a1 remove dead shit from header 2022-01-31 10:53:48 -05:00
Jeff Becker 433febe5c6 update liblokinet udp api header 2022-01-31 10:53:48 -05:00
Jeff Becker 5f49d3a49f update header with notes 2022-01-31 10:53:48 -05:00
Jeff Becker 046ab3d453
export functions in liblokinet for win32 dll 2021-06-08 08:32:52 -04:00
Jeff Becker 83b0f25075
cleanup after rebase 2021-04-19 07:19:07 -04:00
Jeff Becker f63122272d
fix some compiler errors 2021-04-19 07:03:57 -04:00
Jeff Becker 545021aa3d
temp commit 2021-04-19 07:02:46 -04:00
Jeff Becker 3d76e3d4bd
split up liblokinet headers 2021-04-19 07:02:45 -04:00
Jeff Becker 9c2ff92168 remove lokinet header for now 2018-07-24 09:03:05 +10:00
Jeff Becker 19e3b9c642 * more hidden service code
* begin lokinet api
2018-07-23 17:38:29 +10:00