Skip to content

pljhonglu/LewLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LewLogger

日志工具类,支持日志分级,支持 unicode 中文显示,支持 XcodeColors 插件。 若未安装 XcodeColors 插件,也可以通过 emoji 符号区分日志级别。

安装XcodeColors 未安装XcodeColors

设置日志着色

  1. 下载安装 XcodeColors 插件。下载地址
  2. 设置 XcodeColors 参数
    • Xcode 菜单栏 Product -> Scheme -> Edit Scheme
    • 选择 Run -> Arguments
    • Environment Variables 下面点击 +
    • Name 填写 XcodeColorsValue 填写 YES

经过上面设置后,LewLogger 会为不同级别的 Log 自动着色。

使用

[LewLogger setVerbosity:LewLoggerVerbosityBasic];
[LewLogger setDisplayableSeverity:LewLoggerSeverityDebug|LewLoggerSeverityInfo|LewLoggerSeverityWarn|LewLoggerSeverityError];

LLogError(@"error log");
LLogWarn(@"warn log");
LLogInfo(@"info log");
LLogDebug(@"debug log");

License | 许可

This code is distributed under the terms of the MIT license. 代码使用 MIT license 许可发布.

About

日志工具类,支持日志分级,支持 unicode 中文显示,支持 XcodeColors 插件

Resources

License

Stars

Watchers

Forks

Packages

No packages published