CocoaLumberjack FileLogger logging to multiple files

前端 未结 2 1578
挽巷
挽巷 2021-02-06 06:25

I am using this CocoaLumberjack framework to log all my messages in Objective-C design. Now I want to log all errors to one file and all other messages to another file. I know I

2条回答
  •  滥情空心
    2021-02-06 06:47

    You can achieve something very close by using a new feature (different log level for every logger). See https://github.com/robbiehanson/CocoaLumberjack/wiki/PerLoggerLogLevels. Creating 2 file loggers (one having error level and the other having verbose) would is not exactly as you described, since the error logs will go into both files. Is this good enough?

提交回复
热议问题