radicle-log: enhanced log highlighting
Refactor out radicle::Logger and radicle::logger::Logger to radicle-log crate.
Enhance the test logger to highlight:
- Any
base58strings with a deterministic colour - Any git refs to be boldened and underlined
a. Any
base58strings inside refs to adhere to 1. - Any git OIDs (short and long) first 6 characters mapped to a hex colour with light and dark background adjustments
- … any timestamps also coloured as per 3. 👀
- error level logs are all red and underlined (with rules 1 - 4 applied)
- warning level logs are all yellow and underlined (witith rules 1 - 4 applied)
I /think/ I managed to preserve the existing feature toggles, but worth double checking!
Refactor out radicle::Logger and radicle::logger::Logger to radicle-log crate.
Enhance the test logger to highlight:
- Any
base58strings with a deterministic colour - Any git refs to be boldened and underlined
a. Any
base58strings inside refs to adhere to 1. - Any git OIDs (short and long) first 6 characters mapped to a hex colour with light and dark background adjustments
- … any timestamps also coloured as per 3. 👀
- error level logs are all red and underlined (with rules 1 - 4 applied)
- warning level logs are all yellow and underlined (witith rules 1 - 4 applied)
I /think/ I managed to preserve the existing feature toggles, but worth double checking!
Distill
Fix:
- Corretly account for rename while moving files from
radicletoradicle-log. - Fix feature flags.
Honour NO_COLOR environment variable: https://no-color.org/
log: add aliase support for base58 strings via RAD_ALIASES env var
As an example, you can set the following to shorten alice, bob, eve and the repo OID in the logs:
$ RAD_ALIASES="z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk=bob,z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi=alice,z6Mkux1aUQD2voWWukVb5nNUR7thrHveQG4pDQua8nVhib7Z=eve,z42hL2jL4XNk6K8oHQaSWfMgCL7ji=test-repo" cargo nextest run --no-capture
Changes:
- Improvements to mutex use
Rebase