Closed ameue closed 5 years ago
See #531
This does not work @jcavar
I have a suggestion, can you give the log printing permission to the application layer, remove MQTTLog.h and MQTTLog.m to reduce the dependence of MQTT-Client-Framework on the CocoaLumberjack library, as much as possible decoupling. If the application layer does not set ddLogLevel, then the log will not be printed, which is feasible.
Short description
Before using cocoapods to introduce MQTT-Client-Framework, I introduced CocoaLumberjack with cocoapods in my project. I set static const int ddLogLevel = LOG_LEVEL in the .pch file; but I reported an error like DDLogFlag redefine confict during the compilation process.
Environment
Link to logs
Create a GIST which is a paste of your logs, and link them here. Please do NOT paste your full logs here, it will make issue very long and hard to read!
Steps to reproduce
Expected behaviour
Actual behaviour
no log
Other information
I have introduced #import <CocoaLumberjack/CocoaLumberjack.h> in the .pch file and set static const int ddLogLevel = DDLogLevelDebug;. I don't want to comment out the #import <MQTTClient / MQTTLog.h> line in the MQTTClient.h file imported by Pods.xcodeproj, I don't want to manually comment this line every time pod install. Is there any other better way to resolve this compilation conflict? If there is no good solution, I only have to manually import the mqtt source into the project, and then comment out the line that imports the log header file. This way, updating the mqtt version is not convenient with cocoapods.