Commit Graph

10 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
Jason Rhinelander
1ddfb7420a
Merge pull request #1791 from majestrate/exclude-failing-from-queue-2021-10-29
exclude fully failed nodes from service node testing list
2021-10-29 14:44:16 -03:00
Jason Rhinelander
0ec50e6624 Fix comment typo 2021-10-29 11:52:54 -03:00
Jeff Becker
fcba709fcb
do not requeue nodes for testing from failing queue if we do not have them marked as failing anymore 2021-10-29 10:46:50 -04:00
Jeff Becker
afe55f0932
fix for testing:
dont remove from failing set
2021-06-10 14:17:31 -04:00
Jeff Becker
f3deabdb96
* get_failing does not need abstract router as paramter so we remove it
* add remove_node_from_failing to remove a node by pubkey from the failing set
* if a router is deregistered we remove it from the failing set so we don't retest it
* remove a router from the failing set if we get a test success
2021-06-08 10:47:27 -04:00
Jason Rhinelander
7f41c6092c
Fix failing pks not being populated 2021-06-07 16:16:18 -04:00
Jeff Becker
95537804cd
separate white/grey list for active/decommissioned nodes.
allow sessions to decommissioned nodes but not paths.
2021-06-07 10:57:33 -04:00
Jason Rhinelander
e332bbe3f3
Switch stl mt19937_64 to CSRNG 2021-06-07 08:41:35 -04:00
Jeff Becker
9ad90d029d
* use weak_ptr on core rpc
* use reachability testing code lifted storage server's code
2021-06-07 08:41:35 -04:00