测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2014年12月 |
由 Arne Harren 维护。
http://0xc0.de/LibComponentLogging
http://github.com/aharren/LibComponentLogging-UserDefaults
LibComponentLogging-UserDefaults 是 LibComponentLogging 核心的一个扩展,用于将设置存储到/从用户默认设置中。
目前,LCLUserDefaults 类只能存储/恢复活动的日志级别设置。
以下代码展示了在您应用的 main.m 文件中使用 LCLUserDefaults 的简单用法模式
#include "lcl.h"
#include "LCLUserDefaults.h"
int main(int argc, char *argv[]) {
// restore the log level settings from the standard user defaults
[LCLUserDefaults restoreLogLevelSettingsFromStandardUserDefaults];
// start your application
...
}
LCLUserDefaults 使用以下格式存储应用程序域中的日志级别设置
"logging:<bundle identifier>:<log component name>:level" = <integer>
示例
"logging:com.yourcompany.YourApplication:Application/Component 1:level" = 5
"logging:com.yourcompany.YourApplication:Application/Component 2:level" = 3
您可以使用 'defaults' 命令从命令行更改日志级别设置,例如
defaults write <application> "logging:com.yourcompany.YourApplication:Application/Component 1:level" -int 2
Git 仓库包含以下分支
以下 Git 仓库与此仓库相关
版权(c) 2009-2011 Arne Harren [email protected]
以下条件下,任何人获得此软件及其相关文档文件(以下称为“软件”)的副本,均可免费使用本软件,不受限制,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或销售软件复制品的权利,并允许向软件提供方提供软件的人以本等方式行事,前提是
上述版权声明和许可声明应包含在软件的所有副本或实质性部分中。
本软件按“原样”提供,无论明示或暗示,均不承担任何类型的保证,包括但不限于对适销性、特定用途适用性及非侵权的保证。在任何情况下,作者或版权所有者均不对任何索赔、损害或其他责任承担责任,无论该责任产生于合同、侵权或其他任何情况,或者与软件及其使用或其他处理方式有关。