fastdo  0.6.16
eienlog 命名空间参考

日志功能,通过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协议高效的收发日志

枚举类型说明

日志编码。Local表示本地多字节编码,不同国家可能不同

枚举值
leLocal 
leUtf8 
leUtf16Le 
leUtf16Be 

在文件 eienlog.hpp36 行定义.

日志颜色

枚举值
lfcBlack 
lfcMaroon 
lfcAtrovirens 
lfcOlive 
lfcNavy 
lfcPurple 
lfcTeal 
lfcGray 
lfcSilver 
lfcRed 
lfcGreen 
lfcYellow 
lfcBlue 
lfcFuchsia 
lfcAqua 
lfcWhite 

在文件 eienlog.hpp51 行定义.

日志背景颜色

枚举值
lbcBlack 
lbcMaroon 
lbcAtrovirens 
lbcOlive 
lbcNavy 
lbcPurple 
lbcTeal 
lbcGray 
lbcSilver 
lbcRed 
lbcGreen 
lbcYellow 
lbcBlue 
lbcFuchsia 
lbcAqua 
lbcWhite 

在文件 eienlog.hpp75 行定义.

函数说明

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 
)

写二进制日志。可设置颜色参数

返回
发送的封包数量
template<typename... _ArgType>
static void eienlog::LogColorOutput ( winux::Mixed const &  fgColor,
winux::Mixed const &  bgColor,
_ArgType &&...  arg 
)
inlinestatic

在文件 eienlog.hpp282 行定义.