Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Jonathan 'Wolf' Rentzsch http://rentzsch.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Dynamically Enable/Disable WebObjects SQL Logging

Sometimes you want to log generated SQL selectively, so popping -DEOAdaptorDebugEnabled=true on the command line of your app is verbose overkill. Here's how you can selectively enable and disable SQL logging:

   1  NSLog.allowDebugLoggingForGroups(0x10000L);
   2  // Do something that roundtrips the DB, like editingContext.saveChanges().
   3  NSLog.refuseDebugLoggingForGroups(0x10000L);
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS