Kaynağa Gözat

Added -logException:

Pierre-Olivier Latour 11 yıl önce
ebeveyn
işleme
7743d18006

+ 5 - 0
GCDWebServer/Core/GCDWebServer.h

@@ -437,6 +437,11 @@ extern NSString* const GCDWebServerAuthenticationMethod_DigestAccess;
  */
 - (void)logError:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
 
+/**
+ *  Logs an exception with the kGCDWebServerLogLevel_Exception level.
+ */
+- (void)logException:(NSException*)exception;
+
 @end
 
 #ifdef __GCDWEBSERVER_ENABLE_TESTING__

+ 4 - 0
GCDWebServer/Core/GCDWebServer.m

@@ -875,6 +875,10 @@ static inline NSString* _EncodeBase64(NSString* string) {
   ARC_RELEASE(message);
 }
 
+- (void)logException:(NSException*)exception {
+  LOG_EXCEPTION(exception);
+}
+
 @end
 
 #ifdef __GCDWEBSERVER_ENABLE_TESTING__