nojhan / clutchlog

C++ "spatial" logging system which targets versatile, (de)clutchable, _debugging_, in a single header.

Home Page:https://nojhan.github.io/clutchlog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a "{file_fmt}" tag

nojhan opened this issue · comments

commented

Would insert a format tag based on the hash of the current file.
Useful to enable coloring by code "modules".

Would need to know the color mode in which to compute the hash. Probably RGB is too large (too much close colors) and 16-colors too small (too much collisions), so default to 256-colors? (Who has a 4-bits ANSI terminal anyway?)

commented

Either use the 8 most significant bits of std::hash, or implement a byte checksum (probably a better term than hash).