Browse Source

Added -logException:

Pierre-Olivier Latour 11 years ago
parent
commit
7743d18006
2 changed files with 9 additions and 0 deletions
  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);
 
+/**
+ *  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__