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:
warren%netscape.com
2000-10-27 22:43:51 +00:00
parent e7c9040b5e
commit c6b67eceeb
757 changed files with 10724 additions and 8223 deletions

View File

@@ -24,13 +24,11 @@
#include "nsISelection.h"
#include "nsIContent.h"
#include "nsIDOMNodeList.h"
#include "nslog.h"
#ifdef NS_DEBUG
static PRBool gNoisy = PR_FALSE;
#else
static const PRBool gNoisy = PR_FALSE;
#endif
NS_IMPL_LOG(InsertElementTxnLog)
#define PRINTF NS_LOG_PRINTF(InsertElementTxnLog)
#define FLUSH NS_LOG_FLUSH(InsertElementTxnLog)
InsertElementTxn::InsertElementTxn()
: EditTxn()
@@ -64,14 +62,14 @@ InsertElementTxn::~InsertElementTxn()
NS_IMETHODIMP InsertElementTxn::Do(void)
{
if (gNoisy)
if (NS_LOG_ENABLED(InsertElementTxnLog))
{
nsCOMPtr<nsIContent>nodeAsContent = do_QueryInterface(mNode);
nsCOMPtr<nsIContent>parentAsContent = do_QueryInterface(mParent);
nsString namestr;
mNode->GetNodeName(namestr);
char* nodename = namestr.ToNewCString();
printf("%p Do Insert Element of %p <%s> into parent %p at offset %d\n",
PRINTF("%p Do Insert Element of %p <%s> into parent %p at offset %d\n",
this, nodeAsContent.get(), nodename,
parentAsContent.get(), mOffset);
nsMemory::Free(nodename);
@@ -121,8 +119,8 @@ NS_IMETHODIMP InsertElementTxn::Do(void)
NS_IMETHODIMP InsertElementTxn::Undo(void)
{
if (gNoisy) { printf("%p Undo Insert Element of %p into parent %p at offset %d\n",
this, mNode.get(), mParent.get(), mOffset); }
PRINTF("%p Undo Insert Element of %p into parent %p at offset %d\n",
this, mNode.get(), mParent.get(), mOffset);
if (!mNode || !mParent) return NS_ERROR_NOT_INITIALIZED;
nsCOMPtr<nsIDOMNode> resultNode;