mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Fixes
This commit is contained in:
@@ -523,6 +523,14 @@ extern NSString* const GCDWebServerAuthenticationMethod_DigestAccess;
|
|||||||
*
|
*
|
||||||
* @warning The interpretation of the "level" argument depends on the logging
|
* @warning The interpretation of the "level" argument depends on the logging
|
||||||
* facility used at compile time.
|
* facility used at compile time.
|
||||||
|
*
|
||||||
|
* If using the built-in logging facility, the log levels are as follow:
|
||||||
|
* DEBUG = 0
|
||||||
|
* VERBOSE = 1
|
||||||
|
* INFO = 2
|
||||||
|
* WARNING = 3
|
||||||
|
* ERROR = 4
|
||||||
|
* EXCEPTION = 5
|
||||||
*/
|
*/
|
||||||
+ (void)setLogLevel:(int)level;
|
+ (void)setLogLevel:(int)level;
|
||||||
|
|
||||||
|
|||||||
@@ -986,7 +986,7 @@ static inline NSString* _EncodeBase64(NSString* string) {
|
|||||||
[XLSharedFacility setMinLogLevel:level];
|
[XLSharedFacility setMinLogLevel:level];
|
||||||
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_COCOALUMBERJACK__)
|
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_COCOALUMBERJACK__)
|
||||||
GCDWebServerLogLevel = level;
|
GCDWebServerLogLevel = level;
|
||||||
#else
|
#elif defined(__GCDWEBSERVER_LOGGING_FACILITY_BUILTIN__)
|
||||||
GCDWebServerLogLevel = level;
|
GCDWebServerLogLevel = level;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,12 +48,22 @@
|
|||||||
#import "GCDWebServerFileResponse.h"
|
#import "GCDWebServerFileResponse.h"
|
||||||
#import "GCDWebServerStreamedResponse.h"
|
#import "GCDWebServerStreamedResponse.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a custom logging facility should be used instead.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__GCDWEBSERVER_LOGGING_HEADER__)
|
||||||
|
|
||||||
|
#define __GCDWEBSERVER_LOGGING_FACILITY_CUSTOM__
|
||||||
|
|
||||||
|
#import __GCDWEBSERVER_LOGGING_HEADER__
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically detect if XLFacility is available and if so use it as a
|
* Automatically detect if XLFacility is available and if so use it as a
|
||||||
* logging facility.
|
* logging facility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__has_include) && __has_include("XLFacilityMacros.h")
|
#elif defined(__has_include) && __has_include("XLFacilityMacros.h")
|
||||||
|
|
||||||
#define __GCDWEBSERVER_LOGGING_FACILITY_XLFACILITY__
|
#define __GCDWEBSERVER_LOGGING_FACILITY_XLFACILITY__
|
||||||
|
|
||||||
@@ -94,16 +104,6 @@ extern int GCDWebServerLogLevel;
|
|||||||
#define GWS_LOG_ERROR(...) DDLogError(__VA_ARGS__)
|
#define GWS_LOG_ERROR(...) DDLogError(__VA_ARGS__)
|
||||||
#define GWS_LOG_EXCEPTION(__EXCEPTION__) DDLogError(@"%@", __EXCEPTION__)
|
#define GWS_LOG_EXCEPTION(__EXCEPTION__) DDLogError(@"%@", __EXCEPTION__)
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a custom logging facility should be used instead.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#elif defined(__GCDWEBSERVER_LOGGING_HEADER__)
|
|
||||||
|
|
||||||
#define __GCDWEBSERVER_LOGGING_FACILITY_CUSTOM__
|
|
||||||
|
|
||||||
#import __GCDWEBSERVER_LOGGING_HEADER__
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -119,7 +119,7 @@ typedef NS_ENUM(int, GCDWebServerLoggingLevel) {
|
|||||||
kGCDWebServerLoggingLevel_Info,
|
kGCDWebServerLoggingLevel_Info,
|
||||||
kGCDWebServerLoggingLevel_Warning,
|
kGCDWebServerLoggingLevel_Warning,
|
||||||
kGCDWebServerLoggingLevel_Error,
|
kGCDWebServerLoggingLevel_Error,
|
||||||
kGCDWebServerLoggingLevel_Exception,
|
kGCDWebServerLoggingLevel_Exception
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GCDWebServerLoggingLevel GCDWebServerLogLevel;
|
extern GCDWebServerLoggingLevel GCDWebServerLogLevel;
|
||||||
|
|||||||
Reference in New Issue
Block a user