mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
18 lines
465 B
C++
18 lines
465 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <base/types.h>
|
|
|
|
|
|
/** 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();
|