Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -50,14 +50,17 @@
|
||||
#include "nsILocalFileMac.h"
|
||||
#endif
|
||||
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(nsNativeComponentLoaderLog)
|
||||
#define PRINTF NS_LOG_PRINTF(nsNativeComponentLoaderLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsNativeComponentLoaderLog)
|
||||
|
||||
#define PRINT_CRITICAL_ERROR_TO_SCREEN 1
|
||||
#define USE_REGISTRY 1
|
||||
#define XPCOM_USE_NSGETFACTORY 1
|
||||
|
||||
// Logging of debug output
|
||||
#define FORCE_PR_LOG /* Allow logging in the release build */
|
||||
#include "prlog.h"
|
||||
extern PRLogModuleInfo *nsComponentManagerLog;
|
||||
#define nsComponentManagerLog nsNativeComponentLoaderLog
|
||||
|
||||
nsNativeComponentLoader::nsNativeComponentLoader() :
|
||||
mRegistry(nsnull), mCompMgr(nsnull), mDllStore(nsnull)
|
||||
@@ -242,18 +245,12 @@ NS_IMETHODIMP
|
||||
nsNativeComponentLoader::AutoRegisterComponents(PRInt32 aWhen,
|
||||
nsIFile *aDirectory)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
/* do we _really_ want to print this every time? */
|
||||
printf("nsNativeComponentLoader: autoregistering begins.\n");
|
||||
#endif
|
||||
PRINTF("nsNativeComponentLoader: autoregistering begins.\n");
|
||||
|
||||
nsresult rv = RegisterComponentsInDir(aWhen, aDirectory);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("nsNativeComponentLoader: autoregistering %s\n",
|
||||
PRINTF("nsNativeComponentLoader: autoregistering %s\n",
|
||||
NS_FAILED(rv) ? "FAILED" : "succeeded");
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -594,7 +591,7 @@ nsNativeComponentLoader::DumpLoadError(nsDll *dll,
|
||||
|
||||
// Dump to screen if needed
|
||||
#ifdef PRINT_CRITICAL_ERROR_TO_SCREEN
|
||||
printf("**************************************************\n"
|
||||
PRINTF("**************************************************\n"
|
||||
"nsNativeComponentLoader: %s(%s) Load FAILED with error: %s\n"
|
||||
"**************************************************\n",
|
||||
aCallerName,
|
||||
@@ -934,10 +931,8 @@ nsresult
|
||||
nsNativeComponentLoader::RegisterDeferredComponents(PRInt32 aWhen,
|
||||
PRBool *aRegistered)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "nNCL: registering deferred (%d)\n",
|
||||
PRINTF("nNCL: registering deferred (%d)\n",
|
||||
mDeferredComponents.Count());
|
||||
#endif
|
||||
*aRegistered = PR_FALSE;
|
||||
if (!mDeferredComponents.Count())
|
||||
return NS_OK;
|
||||
@@ -955,10 +950,10 @@ nsNativeComponentLoader::RegisterDeferredComponents(PRInt32 aWhen,
|
||||
}
|
||||
|
||||
if (*aRegistered)
|
||||
fprintf(stderr, "nNCL: registered deferred, %d left\n",
|
||||
PRINTF("nNCL: registered deferred, %d left\n",
|
||||
mDeferredComponents.Count());
|
||||
else
|
||||
fprintf(stderr, "nNCL: didn't register any components, %d left\n",
|
||||
PRINTF("nNCL: didn't register any components, %d left\n",
|
||||
mDeferredComponents.Count());
|
||||
/* are there any fatal errors? */
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user