6
6
7
7
#if DEBUG
8
8
#if 0
9
- #warning Logging SSYOperationLinker Operations. DO NOT SHIP THIS!
10
- #define LOGGING_SSYOPERATIONLINKER_OPERATIONS 1
11
- #import "BkmxBasis.h"
9
+ #warning Logging running of operations in SSYOperation. DO NOT SHIP THIS!
10
+ /* For this to work, you must set the file path of the singleton
11
+ SSYLinearFileWriter object before beginning operations. */
12
+ #define LOG_RUNNING_OF_OPERATIONS 1
13
+ #import "SSYLinearFileWriter.h"
12
14
#endif
13
15
#endif
14
16
@@ -226,7 +228,7 @@ - (BOOL)lockIsBlocking {
226
228
227
229
- (void )main {
228
230
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc ] init ] ;
229
- #if LOGGING_SSYOPERATIONLINKER_OPERATIONS
231
+ #if LOG_RUNNING_OF_OPERATIONS
230
232
NSString * msg = [NSString stringWithFormat:
231
233
@" RunOp: %p grp=%@ prevErr=%ld nQ=%ld sel=%@ isCnc=%hhd " ,
232
234
self ,
@@ -235,7 +237,7 @@ - (void)main {
235
237
(long )[[[self operationQueue ] operations ] count ], // nQ = number in queue
236
238
NSStringFromSelector ([self selector ]),
237
239
[self isCancelled ]];
238
- [[BkmxBasis sharedBasis ] logFormat : msg];
240
+ [SSYLinearFileWriter writeLine : msg];
239
241
#endif
240
242
241
243
if (![self isCancelled ]) {
@@ -265,20 +267,26 @@ - (void)main {
265
267
else {
266
268
// Chain operations have been aborted.
267
269
// This method becomes a no-op.
268
- #if LOGGING_SSYOPERATIONLINKER_OPERATIONS
269
- [[BkmxBasis sharedBasis ] logFormat: @" RunOp: Skipping %@ cuz error op=%p " , NSStringFromSelector ([self selector ]), self ];
270
+ #if LOG_RUNNING_OF_OPERATIONS
271
+ NSString * msg = [[NSString alloc ] initWithFormat: @" RunOp: Skipping %@ cuz error op=%p " , NSStringFromSelector ([self selector ]), self ];
272
+ [SSYLinearFileWriter writeLine: msg];
273
+ [msg release ];
270
274
#endif
271
275
}
272
276
}
273
277
else {
274
- #if LOGGING_SSYOPERATIONLINKER_OPERATIONS
275
- [[BkmxBasis sharedBasis ] logFormat: @" RunOp: Skipping %@ cuz skip group %@ op=%p " , NSStringFromSelector ([self selector ]), [[self info ] objectForKey: constKeySSYOperationGroup], self ];
278
+ #if LOG_RUNNING_OF_OPERATIONS
279
+ NSString * msg = [[NSString alloc ] initWithFormat: @" RunOp: Skipping %@ cuz skip group %@ op=%p " , NSStringFromSelector ([self selector ]), [[self info ] objectForKey: constKeySSYOperationGroup], self ];
280
+ [SSYLinearFileWriter writeLine: msg];
281
+ [msg release ];
276
282
#endif
277
283
}
278
284
}
279
285
else {
280
- #if LOGGING_SSYOPERATIONLINKER_OPERATIONS
281
- [[BkmxBasis sharedBasis ] logFormat: @" RunOp: Skipping %@ cuz cancelled op=%p " , NSStringFromSelector ([self selector ]), self ];
286
+ #if LOG_RUNNING_OF_OPERATIONS
287
+ NSString * msg = [[NSString alloc ] initWithFormat: @" RunOp: Skipping %@ cuz cancelled op=%p " , NSStringFromSelector ([self selector ]), self ];
288
+ [SSYLinearFileWriter writeLine: msg];
289
+ [msg release ];
282
290
#endif
283
291
}
284
292
0 commit comments