fastdo
0.6.16
|
日志功能,通过UDP协议高效的收发日志 更多...
类 | |
struct | LogChunk |
日志分块 更多... | |
struct | LogChunkHeader |
日志分块头部 更多... | |
union | LogFlag |
日志样式旗标 更多... | |
class | LogReader |
日志读取器 更多... | |
struct | LogRecord |
日志记录 更多... | |
class | LogWriter |
日志写入器 更多... | |
枚举 | |
enum | LogEncoding { leLocal, leUtf8, leUtf16Le, leUtf16Be } |
日志编码。Local 表示本地多字节编码,不同国家可能不同 更多... | |
enum | LogFgColor : winux::uint16 { lfcBlack = (winux::uint16)( ( 0 ) | ( ( 0 ) << 5 ) | ( ( 0 ) << 10 ) ), lfcMaroon = (winux::uint16)( ( 16 ) | ( ( 0 ) << 5 ) | ( ( 0 ) << 10 ) ), lfcAtrovirens = (winux::uint16)( ( 0 ) | ( ( 16 ) << 5 ) | ( ( 0 ) << 10 ) ), lfcOlive = lfcMaroon | lfcAtrovirens, lfcNavy = (winux::uint16)( ( 0 ) | ( ( 0 ) << 5 ) | ( ( 16 ) << 10 ) ), lfcPurple = lfcMaroon | lfcNavy, lfcTeal = lfcAtrovirens | lfcNavy, lfcGray = lfcMaroon | lfcAtrovirens | lfcNavy, lfcSilver = (winux::uint16)( ( 24 ) | ( ( 24 ) << 5 ) | ( ( 24 ) << 10 ) ), lfcRed = (winux::uint16)( ( 31 ) | ( ( 0 ) << 5 ) | ( ( 0 ) << 10 ) ), lfcGreen = (winux::uint16)( ( 0 ) | ( ( 31 ) << 5 ) | ( ( 0 ) << 10 ) ), lfcYellow = lfcRed | lfcGreen, lfcBlue = (winux::uint16)( ( 0 ) | ( ( 0 ) << 5 ) | ( ( 31 ) << 10 ) ), lfcFuchsia = lfcRed | lfcBlue, lfcAqua = lfcGreen | lfcBlue, lfcWhite = lfcRed | lfcGreen | lfcBlue } |
日志颜色 更多... | |
enum | LogBgColor : winux::uint16 { lbcBlack = (winux::uint16)( ( 0 ) | ( ( 0 ) << 4 ) | ( ( 0 ) << 8 ) ), lbcMaroon = (winux::uint16)( ( 8 ) | ( ( 0 ) << 4 ) | ( ( 0 ) << 8 ) ), lbcAtrovirens = (winux::uint16)( ( 0 ) | ( ( 8 ) << 4 ) | ( ( 0 ) << 8 ) ), lbcOlive = lbcMaroon | lbcAtrovirens, lbcNavy = (winux::uint16)( ( 0 ) | ( ( 0 ) << 4 ) | ( ( 8 ) << 8 ) ), lbcPurple = lbcMaroon | lbcNavy, lbcTeal = lbcAtrovirens | lbcNavy, lbcGray = lbcMaroon | lbcAtrovirens | lbcNavy, lbcSilver = (winux::uint16)( ( 12 ) | ( ( 12 ) << 4 ) | ( ( 12 ) << 8 ) ), lbcRed = (winux::uint16)( ( 15 ) | ( ( 0 ) << 4 ) | ( ( 0 ) << 8 ) ), lbcGreen = (winux::uint16)( ( 0 ) | ( ( 15 ) << 4 ) | ( ( 0 ) << 8 ) ), lbcYellow = lbcRed | lbcGreen, lbcBlue = (winux::uint16)( ( 0 ) | ( ( 0 ) << 4 ) | ( ( 15 ) << 8 ) ), lbcFuchsia = lbcRed | lbcBlue, lbcAqua = lbcGreen | lbcBlue, lbcWhite = lbcRed | lbcGreen | lbcBlue } |
日志背景颜色 更多... | |
函数 | |
bool | EnableLog (winux::String const &addr=$"127.0.0.1", winux::ushort port=22345, winux::uint16 chunkSize=80) |
启用日志 更多... | |
void | DisableLog () |
禁用日志 更多... | |
void | WriteLog (winux::String const &str) |
写字符串日志(带进程ID) 更多... | |
void | WriteLogBin (void const *data, size_t size) |
写二进制日志 更多... | |
size_t | Log (winux::String const &str, winux::uint8 logEncoding=leUtf8) |
写字符串日志 更多... | |
size_t | LogBin (winux::Buffer const &data) |
写二进制日志 更多... | |
size_t | LogColor (winux::String const &str, winux::Mixed const &fgColor=winux::mxNull, winux::Mixed const &bgColor=winux::mxNull, winux::uint8 logEncoding=leUtf8) |
写字符串日志。可设置颜色参数 更多... | |
size_t | LogBinColor (winux::Buffer const &data, winux::Mixed const &fgColor=winux::mxNull, winux::Mixed const &bgColor=winux::mxNull) |
写二进制日志。可设置颜色参数 更多... | |
template<typename... _ArgType> | |
static void | LogColorOutput (winux::Mixed const &fgColor, winux::Mixed const &bgColor, _ArgType &&...arg) |
日志功能,通过UDP协议高效的收发日志
enum eienlog::LogEncoding |
enum eienlog::LogFgColor : winux::uint16 |
日志颜色
枚举值 | |
---|---|
lfcBlack | |
lfcMaroon | |
lfcAtrovirens | |
lfcOlive | |
lfcNavy | |
lfcPurple | |
lfcTeal | |
lfcGray | |
lfcSilver | |
lfcRed | |
lfcGreen | |
lfcYellow | |
lfcBlue | |
lfcFuchsia | |
lfcAqua | |
lfcWhite |
在文件 eienlog.hpp 第 51 行定义.
enum eienlog::LogBgColor : winux::uint16 |
日志背景颜色
枚举值 | |
---|---|
lbcBlack | |
lbcMaroon | |
lbcAtrovirens | |
lbcOlive | |
lbcNavy | |
lbcPurple | |
lbcTeal | |
lbcGray | |
lbcSilver | |
lbcRed | |
lbcGreen | |
lbcYellow | |
lbcBlue | |
lbcFuchsia | |
lbcAqua | |
lbcWhite |
在文件 eienlog.hpp 第 75 行定义.
bool eienlog::EnableLog | ( | winux::String const & | addr = $"127.0.0.1" , |
winux::ushort | port = 22345 , |
||
winux::uint16 | chunkSize = 80 |
||
) |
启用日志
void eienlog::DisableLog | ( | ) |
禁用日志
void eienlog::WriteLog | ( | winux::String const & | str | ) |
写字符串日志(带进程ID)
void eienlog::WriteLogBin | ( | void const * | data, |
size_t | size | ||
) |
写二进制日志
size_t eienlog::Log | ( | winux::String const & | str, |
winux::uint8 | logEncoding = leUtf8 |
||
) |
写字符串日志
size_t eienlog::LogBin | ( | winux::Buffer const & | data | ) |
写二进制日志
size_t eienlog::LogColor | ( | winux::String const & | str, |
winux::Mixed const & | fgColor = winux::mxNull , |
||
winux::Mixed const & | bgColor = winux::mxNull , |
||
winux::uint8 | logEncoding = leUtf8 |
||
) |
写字符串日志。可设置颜色参数
size_t eienlog::LogBinColor | ( | winux::Buffer const & | data, |
winux::Mixed const & | fgColor = winux::mxNull , |
||
winux::Mixed const & | bgColor = winux::mxNull |
||
) |
写二进制日志。可设置颜色参数
|
inlinestatic |
在文件 eienlog.hpp 第 282 行定义.