@ -33,11 +33,6 @@ Pod::Spec.new do |s|
|
|||||||
cs.osx.framework = 'SystemConfiguration'
|
cs.osx.framework = 'SystemConfiguration'
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec "CocoaLumberjack" do |cs|
|
|
||||||
cs.dependency 'GCDWebServer/Core'
|
|
||||||
cs.dependency 'CocoaLumberjack', '~> 3'
|
|
||||||
end
|
|
||||||
|
|
||||||
s.subspec 'WebDAV' do |cs|
|
s.subspec 'WebDAV' do |cs|
|
||||||
cs.subspec "Core" do |ccs|
|
cs.subspec "Core" do |ccs|
|
||||||
ccs.dependency 'GCDWebServer/Core'
|
ccs.dependency 'GCDWebServer/Core'
|
||||||
@ -48,11 +43,6 @@ Pod::Spec.new do |s|
|
|||||||
ccs.osx.library = 'xml2'
|
ccs.osx.library = 'xml2'
|
||||||
ccs.compiler_flags = '-I$(SDKROOT)/usr/include/libxml2'
|
ccs.compiler_flags = '-I$(SDKROOT)/usr/include/libxml2'
|
||||||
end
|
end
|
||||||
|
|
||||||
cs.subspec "CocoaLumberjack" do |cscl|
|
|
||||||
cscl.dependency 'GCDWebServer/WebDAV/Core'
|
|
||||||
cscl.dependency 'GCDWebServer/CocoaLumberjack'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'WebUploader' do |cs|
|
s.subspec 'WebUploader' do |cs|
|
||||||
@ -62,10 +52,5 @@ Pod::Spec.new do |s|
|
|||||||
ccs.requires_arc = true
|
ccs.requires_arc = true
|
||||||
ccs.resource = "GCDWebUploader/GCDWebUploader.bundle"
|
ccs.resource = "GCDWebUploader/GCDWebUploader.bundle"
|
||||||
end
|
end
|
||||||
|
|
||||||
cs.subspec "CocoaLumberjack" do |cscl|
|
|
||||||
cscl.dependency 'GCDWebServer/WebUploader/Core'
|
|
||||||
cscl.dependency 'GCDWebServer/CocoaLumberjack'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -532,11 +532,10 @@ extern NSString* const GCDWebServerAuthenticationMethod_DigestAccess;
|
|||||||
*
|
*
|
||||||
* Currently supported third-party logging facilities are:
|
* Currently supported third-party logging facilities are:
|
||||||
* - XLFacility (by the same author as GCDWebServer): https://github.com/swisspol/XLFacility
|
* - XLFacility (by the same author as GCDWebServer): https://github.com/swisspol/XLFacility
|
||||||
* - CocoaLumberjack: https://github.com/CocoaLumberjack/CocoaLumberjack
|
|
||||||
*
|
*
|
||||||
* For both the built-in logging facility and CocoaLumberjack, the default
|
* For the built-in logging facility, the default logging level is INFO
|
||||||
* logging level is INFO (or DEBUG if the preprocessor constant "DEBUG"
|
* (or DEBUG if the preprocessor constant "DEBUG" evaluates to non-zero at
|
||||||
* evaluates to non-zero at compile time).
|
* compile time).
|
||||||
*
|
*
|
||||||
* It's possible to have GCDWebServer use a custom logging facility by defining
|
* It's possible to have GCDWebServer use a custom logging facility by defining
|
||||||
* the "__GCDWEBSERVER_LOGGING_HEADER__" preprocessor constant in Xcode build
|
* the "__GCDWEBSERVER_LOGGING_HEADER__" preprocessor constant in Xcode build
|
||||||
|
|||||||
@ -77,12 +77,6 @@ GCDWebServerLoggingLevel GCDWebServerLogLevel = kGCDWebServerLoggingLevel_Debug;
|
|||||||
#else
|
#else
|
||||||
GCDWebServerLoggingLevel GCDWebServerLogLevel = kGCDWebServerLoggingLevel_Info;
|
GCDWebServerLoggingLevel GCDWebServerLogLevel = kGCDWebServerLoggingLevel_Info;
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_COCOALUMBERJACK__)
|
|
||||||
#if DEBUG
|
|
||||||
DDLogLevel GCDWebServerLogLevel = DDLogLevelDebug;
|
|
||||||
#else
|
|
||||||
DDLogLevel GCDWebServerLogLevel = DDLogLevelInfo;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
@ -1092,8 +1086,6 @@ static inline NSString* _EncodeBase64(NSString* string) {
|
|||||||
+ (void)setLogLevel:(int)level {
|
+ (void)setLogLevel:(int)level {
|
||||||
#if defined(__GCDWEBSERVER_LOGGING_FACILITY_XLFACILITY__)
|
#if defined(__GCDWEBSERVER_LOGGING_FACILITY_XLFACILITY__)
|
||||||
[XLSharedFacility setMinLogLevel:level];
|
[XLSharedFacility setMinLogLevel:level];
|
||||||
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_COCOALUMBERJACK__)
|
|
||||||
GCDWebServerLogLevel = level;
|
|
||||||
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_BUILTIN__)
|
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_BUILTIN__)
|
||||||
GCDWebServerLogLevel = level;
|
GCDWebServerLogLevel = level;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -83,27 +83,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
#define GWS_DCHECK(__CONDITION__) XLOG_DEBUG_CHECK(__CONDITION__)
|
#define GWS_DCHECK(__CONDITION__) XLOG_DEBUG_CHECK(__CONDITION__)
|
||||||
#define GWS_DNOT_REACHED() XLOG_DEBUG_UNREACHABLE()
|
#define GWS_DNOT_REACHED() XLOG_DEBUG_UNREACHABLE()
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically detect if CocoaLumberJack is available and if so use
|
|
||||||
* it as a logging facility.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#elif defined(__has_include) && __has_include("CocoaLumberjack/CocoaLumberjack.h")
|
|
||||||
|
|
||||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
|
||||||
|
|
||||||
#define __GCDWEBSERVER_LOGGING_FACILITY_COCOALUMBERJACK__
|
|
||||||
|
|
||||||
#undef LOG_LEVEL_DEF
|
|
||||||
#define LOG_LEVEL_DEF GCDWebServerLogLevel
|
|
||||||
extern DDLogLevel GCDWebServerLogLevel;
|
|
||||||
|
|
||||||
#define GWS_LOG_DEBUG(...) DDLogDebug(__VA_ARGS__)
|
|
||||||
#define GWS_LOG_VERBOSE(...) DDLogVerbose(__VA_ARGS__)
|
|
||||||
#define GWS_LOG_INFO(...) DDLogInfo(__VA_ARGS__)
|
|
||||||
#define GWS_LOG_WARNING(...) DDLogWarn(__VA_ARGS__)
|
|
||||||
#define GWS_LOG_ERROR(...) DDLogError(__VA_ARGS__)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If all of the above fail, then use GCDWebServer built-in
|
* If all of the above fail, then use GCDWebServer built-in
|
||||||
* logging facility.
|
* logging facility.
|
||||||
|
|||||||
Reference in New Issue
Block a user