MLogger 1.1.1

MLogger 1.1.1

Mahmoud维护。



MLogger 1.1.1

  • Mahmoud

MLogger

Build Status Version License Platform

什么是 MLogger

MLogger 是一个小型日志记录器,用于测试用例和跟踪控制台上的日志,并将它们保存到本地的 .text 文件中。

示例

要运行示例项目,请首先克隆仓库,然后在 Example 目录中运行 pod install

要求

  • IOS 10.0+
  • Xcode 9.0

安装

MLogger 通过 CocoaPods 提供使用。要安装它,只需将以下行添加到您的 Podfile 中

pod 'MLogger'

用法

基本

如果您正在使用 CocoaPods 集成 MLogger,请先导入 MLogger

import MLogger
 // Basic Usages
  MLogger.debug("This is a DEBUG message") // DEBUG log
  MLogger.error("This is an ERROR message") // ERROR log
  MLogger.info("This is a INFO message") // INFO log
  MLogger.verbose("This is a VERBOSE message") // VERBOSE log
  MLogger.warning("This is a WARNING message") // WARNING log
  MLogger.severe("This is a SEVERE message") // SEVERE Error log
// Log on Xcode Console
2018-06-09 01:03:37694 [💬][AppDelegate.swift]:20 15 application(_:didFinishLaunchingWithOptions:) -> This is a DEBUG message
2018-06-09 01:03:37722 [‼️][AppDelegate.swift]:21 15 application(_:didFinishLaunchingWithOptions:) -> This is an ERROR message
2018-06-09 01:03:37723 [ℹ️][AppDelegate.swift]:22 15 application(_:didFinishLaunchingWithOptions:) -> This is a INFO message
2018-06-09 01:03:37724 [🔬][AppDelegate.swift]:23 15 application(_:didFinishLaunchingWithOptions:) -> This is a VERBOSE message
2018-06-09 01:03:37724 [⚠️][AppDelegate.swift]:24 15 application(_:didFinishLaunchingWithOptions:) -> This is a WARNING message
2018-06-09 01:03:37725 [🔥][AppDelegate.swift]:25 15 application(_:didFinishLaunchingWithOptions:) -> This is a SEVERE message

如何找到 MLogger.text 文件路径

//MARK:- Print the Mlogger.text file path into the console

MLogger.printMloggerFilePath()

作者

Mahmoud Abdelshafi,邮箱:[email protected]

许可证

MLogger 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。