--- old/src/macosx/native/sun/osxapp/AWT_debug.h 2014-06-03 15:01:17.000000000 +0400 +++ new/src/macosx/native/sun/osxapp/AWT_debug.h 2014-06-03 15:01:16.000000000 +0400 @@ -28,12 +28,23 @@ #import +static bool ShouldPrintVerboseDebugging() { + static int debug = -1; + if (debug == -1) { + debug = (int)(getenv("JAVA_AWT_VERBOSE") != NULL); + } + return (bool)debug; +} + #define kInternalError "java/lang/InternalError" #define AWT_DEBUG_LOG(str) \ NSLog(@"\tCocoa AWT: %@ %@", str, [NSThread callStackSymbols]) +#define AWT_STARTUP_LOG(str) \ + if (ShouldPrintVerboseDebugging()) AWT_DEBUG_LOG((str)) + #define AWT_DEBUG_BUG_REPORT_MESSAGE \ NSLog(@"\tPlease file a bug report at http://bugreport.java.com/bugreport \ with this message and a reproducible test case.")