VirtualBox

Changeset 16513 in vbox for trunk/src/VBox/Main/cbinding


Ignore:
Timestamp:
Feb 4, 2009 2:03:16 PM (16 years ago)
Author:
vboxsync
Message:

Converted cout,cerr to use iprt Log functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/cbinding/VBoxXPCOMC.cpp

    r16497 r16513  
    2828
    2929#include <iprt/string.h>
     30#include <iprt/log.h>
    3031
    3132#include "VirtualBox_XPCOM.h"
     
    8889 * add a flag argument and define VBOXCOMINIT_FLAG_VERBOSE for the purpose. */
    8990
    90     // All numbers on stderr in hex prefixed with 0X.
    91     cerr.setf(ios_base::showbase | ios_base::uppercase);
    92     cerr.setf(ios_base::hex, ios_base::basefield);
    93 
    9491    rc = NS_InitXPCOM2(&serviceManager, nsnull, nsnull);
    9592    if (NS_FAILED(rc))
    9693    {
    97         cerr << "XPCOM could not be initialized! rc=" << rc << endl;
     94        Log(("Cbinding: XPCOM could not be initialized! rc=0x%x\n",rc));
    9895        VBoxComUninitialize();
    9996        return;
     
    103100    if (NS_FAILED(rc))
    104101    {
    105         cerr << "could not get component manager! rc=" << rc << endl;
     102        Log(("Cbinding: Could not get component manager! rc=0x%x\n",rc));
    106103        VBoxComUninitialize();
    107104        return;
     
    114111    if (NS_FAILED(rc))
    115112    {
    116         cerr << "could not instantiate VirtualBox object! rc=" << rc << endl;
     113        Log(("Cbinding: Could not instantiate VirtualBox object! rc=0x%x\n",rc));
    117114        VBoxComUninitialize();
    118115        return;
    119116    }
    120117
    121     cout << "VirtualBox object created." << endl;
     118    Log(("Cbinding: IVirtualBox object created.\n"));
    122119
    123120    rc = manager->CreateInstanceByContractID (NS_SESSION_CONTRACTID,
     
    127124    if (NS_FAILED(rc))
    128125    {
    129         cerr << "could not instantiate Session object! rc=" << rc << endl;
     126        Log(("Cbinding: Could not instantiate Session object! rc=0x%x\n",rc));
    130127        VBoxComUninitialize();
    131128        return;
    132129    }
    133130
    134     cout << "ISession object created." << endl;
     131    Log(("Cbinding: ISession object created.\n"));
    135132}
    136133
     
    147144        NS_RELEASE(serviceManager); // decrement refcount
    148145    NS_ShutdownXPCOM(nsnull);
    149     cout << "Done!" << endl;
     146    Log(("Cbinding: Cleaned up the created IVirtualBox and ISession Objects.\n"));
    150147}
    151148
    152149/* vim: set ts=4 sw=4 et: */
    153 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette