2020-10-10 18:37:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-21 20:01:38 +00:00
|
|
|
#include <string>
|
2020-03-19 10:38:34 +00:00
|
|
|
#include <common/types.h>
|
2020-02-21 20:01:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
/** Set color in terminal based on 64-bit hash value.
|
|
|
|
* It can be used to choose some random color deterministically based on some other value.
|
|
|
|
* Hash value should be uniformly distributed.
|
|
|
|
*/
|
|
|
|
std::string setColor(UInt64 hash);
|
|
|
|
|
|
|
|
/** Set color for logger priority value. */
|
|
|
|
const char * setColorForLogPriority(int priority);
|
|
|
|
|
|
|
|
/** Undo changes made by the functions above. */
|
|
|
|
const char * resetColor();
|