ELExport
是一种简单安全的导出日志文件的方式。使用ELog
代替NSLog
可以在磁盘上的日志文件中获取更多信息。
ELog.xcodeproj
。ELogTests.m
中尝试测试用例,以了解如何使用ELExport.h
中的方法。要使用CocoaPods将ELExport集成到您的Xcode项目中,请在您的Podfile
中指定它
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'TargetName' do
pod 'ELExport', '~> 0.0.3'
end
然后,运行以下命令
$ pod install
ELEFile
ELExport
在导入ELExport.h
到您要导出日志到磁盘的代码文件后,只需尝试将NSLog
替换为ELog
。然后,所有日志将在正确的时间和以安全的方式自动保存在磁盘上的文件中。
确保任何重要的日志记录都使用[[ELExport sharedExport] synchronize]
来保持一致。
The MIT License (MIT)
Copyright (c) 2016 Alfred Jiang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.