Selaa lähdekoodia

Added -logException:

Pierre-Olivier Latour 11 vuotta sitten
vanhempi
commit
7743d18006
2 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 5 0
      GCDWebServer/Core/GCDWebServer.h
  2. 4 0
      GCDWebServer/Core/GCDWebServer.m

+ 5 - 0
GCDWebServer/Core/GCDWebServer.h

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

+ 4 - 0
GCDWebServer/Core/GCDWebServer.m

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