@@ -85,22 +85,22 @@ - (void)operationDidStart:(NSNotification *)notification {
8585 }
8686
8787 id body = nil ;
88- if ([operation.request HTTPBody ] && self.level <= AFHTTPClientLogLevelVerbose ) {
88+ if ([operation.request HTTPBody ] && self.level <= AFHTTPClientLogLevelDebug ) {
8989 body = [NSJSONSerialization JSONObjectWithData: [operation.request HTTPBody ] options: NSJSONReadingAllowFragments error: nil ];
9090 if (body == nil ) {
9191 body = [[NSString alloc ] initWithData: [operation.request HTTPBody ] encoding: NSUTF8StringEncoding];
9292 }
9393 }
9494
9595 switch (self.level ) {
96- case AFHTTPClientLogLevelDebug :
96+ case AFHTTPClientLogLevelVerbose :
9797 if (body) {
9898 NSLog (@" >> %@ %@ \n %@ \n %@ " , [operation.request HTTPMethod ], [[operation.request URL ] absoluteString ], [operation.request allHTTPHeaderFields ], body);
9999 } else {
100100 NSLog (@" >> %@ %@ \n %@ " , [operation.request HTTPMethod ], [[operation.request URL ] absoluteString ], [operation.request allHTTPHeaderFields ]);
101101 }
102102 break ;
103- case AFHTTPClientLogLevelVerbose :
103+ case AFHTTPClientLogLevelDebug :
104104 if (body) {
105105 NSLog (@" >> %@ %@ \n %@ " , [operation.request HTTPMethod ], [[operation.request URL ] absoluteString ], body);
106106 } else {
@@ -133,25 +133,25 @@ - (void)operationDidFinish:(NSNotification *)notification {
133133
134134 if (operation.error ) {
135135 switch (self.level ) {
136+ case AFHTTPClientLogLevelVerbose:
136137 case AFHTTPClientLogLevelDebug:
137138 NSLog (@" !! %ld %@ : %@ " , (long )[operation.response statusCode ], [URL absoluteString ], operation.error );
138139 break ;
139- case AFHTTPClientLogLevelVerbose:
140140 case AFHTTPClientLogLevelInfo:
141141 case AFHTTPClientLogLevelError:
142142 NSLog (@" !! %ld %@ : %@ " , (long )[operation.response statusCode ], [URL absoluteString ], [operation.error localizedDescription ]);
143143 break ;
144144 }
145145 } else {
146146 switch (self.level ) {
147- case AFHTTPClientLogLevelDebug :
147+ case AFHTTPClientLogLevelVerbose :
148148 if (operation.responseString ) {
149149 NSLog (@" << %ld %@ \n %@ \n %@ " , (long )[operation.response statusCode ], [URL absoluteString ], [operation.response allHeaderFields ], operation.responseObject );
150150 } else {
151151 NSLog (@" << %ld %@ \n %@ " , (long )[operation.response statusCode ], [URL absoluteString ], [operation.response allHeaderFields ]);
152152 }
153153 break ;
154- case AFHTTPClientLogLevelVerbose :
154+ case AFHTTPClientLogLevelDebug :
155155 if (operation.responseString ) {
156156 NSLog (@" << %ld %@ \n %@ " , (long )[operation.response statusCode ], [URL absoluteString ], operation.responseObject );
157157 } else {
0 commit comments