当前位置: 首页>>代码示例>>C++>>正文


C++ PEG_TRACE_CSTRING函数代码示例

本文整理汇总了C++中PEG_TRACE_CSTRING函数的典型用法代码示例。如果您正苦于以下问题:C++ PEG_TRACE_CSTRING函数的具体用法?C++ PEG_TRACE_CSTRING怎么用?C++ PEG_TRACE_CSTRING使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PEG_TRACE_CSTRING函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PEG_TRACE_CSTRING

/**
    closeConnectionSocket - close the server listening socket to disallow
    new client connections.
*/
void HTTPAcceptor::closeConnectionSocket()
{
    if (_rep)
    {
        // unregister the socket

        // ATTN - comment out - see CIMServer::stopClientConnection()
        //_monitor->unsolicitSocketMessages(_rep->socket);

        // close the socket
        _rep->closeSocket();
        // Unlink Local Domain Socket Bug# 3312
        if (_connectionType == LOCAL_CONNECTION)
        {
#ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
            PEG_TRACE_CSTRING(TRC_HTTP, Tracer::LEVEL3,
                "HTTPAcceptor::closeConnectionSocket Unlinking local "
                    "connection.");
            ::unlink(
                reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);
#else
            PEGASUS_ASSERT(false);
#endif
        }
    }
    else
    {
        PEG_TRACE_CSTRING(TRC_HTTP, Tracer::LEVEL2,
            "HTTPAcceptor::closeConnectionSocket failure _rep is null.");
    }
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:35,代码来源:HTTPAcceptor.cpp

示例2: PEG_METHOD_ENTER

Sint8 Thread::initializeKey()
{
    PEG_METHOD_ENTER(TRC_THREAD, "Thread::initializeKey");
    if (!Thread::_key_initialized)
    {
        if (Thread::_key_error)
        {
            PEG_TRACE_CSTRING(TRC_THREAD, Tracer::LEVEL1,
                          "Thread: ERROR - thread key error");
            return -1;
        }

        if (TSDKey::create(&Thread::_platform_thread_key) == 0)
        {
            PEG_TRACE_CSTRING(TRC_THREAD, Tracer::LEVEL4,
                          "Thread: able to create a thread key");
            Thread::_key_initialized = true;
        }
        else
        {
            PEG_TRACE_CSTRING(TRC_THREAD, Tracer::LEVEL1,
                          "Thread: ERROR - unable to create a thread key");
            Thread::_key_error = true;
            return -1;
        }
    }

    PEG_METHOD_EXIT();
    return 0;
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:30,代码来源:Thread.cpp

示例3: PEG_METHOD_ENTER

Sint32 MP_Socket::accept()
{
#ifndef PEGASUS_OS_ZOS
    return 1;
#else
    PEG_METHOD_ENTER(TRC_SSL, "MP_Socket::accept()");
    // ************************************************************************
    // This is a z/OS specific section. No other platform can port this.
    // Pegasus on z/OS has no OpenSSL but cat use a transparent layer called
    // AT-TLS ( Applicatin Transparent Transport Layer Security ) to handle
    // HTTPS connections.
    // ************************************************************************

    int rc;

    if (isSecure())
    {
        PEG_TRACE_CSTRING(TRC_SSL, Tracer::LEVEL4, "---> HTTPS processing.");
        rc = ATTLS_zOS_query();
    }
    else
    {
        // ********************************************************************
        // If the socket is a UNIX Domain socket on z/OS, the local security
        // credentials are read form the socket.
        // ********************************************************************
        LocalSocket_zOS_query();
        PEG_TRACE_CSTRING(TRC_SSL, Tracer::LEVEL4,
            "---> Normal HTTP processing.");
        rc = 1;
    }
    PEG_METHOD_EXIT();
    return rc;
#endif
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:35,代码来源:TLS.cpp

示例4: errGetOwningEntity

    static CMPIString* errGetOwningEntity(
        const CMPIError* eErr, 
        CMPIStatus* rc)
    {
        PEG_METHOD_ENTER(
            TRC_CMPIPROVIDERINTERFACE,
            "CMPI_Error:errGetOwningEntity()");
        CIMError* cer=(CIMError*)eErr->hdl;
        if (!cer)
        {
            PEG_TRACE_CSTRING(
                TRC_CMPIPROVIDERINTERFACE,
                Tracer::LEVEL1,
                "Received invalid Handle - cer...");
            CMSetStatus(rc, CMPI_RC_ERR_INVALID_PARAMETER);
            PEG_METHOD_EXIT();
            return NULL;
        }

        CMPIBoolean notNull;
        String pgOwningEntity;

        try
        {
            notNull = cer->getOwningEntity(pgOwningEntity);
            if (!notNull)
            {
                PEG_TRACE_CSTRING(
                    TRC_CMPIPROVIDERINTERFACE,
                    Tracer::LEVEL1,
                    "Received invalid Parameter...");
                CMSetStatus(rc, CMPI_RC_ERR_INVALID_PARAMETER);
                PEG_METHOD_EXIT();
                return NULL;
            }
        }
        catch (...)
        {
            PEG_TRACE_CSTRING(
                TRC_CMPIPROVIDERINTERFACE,
                Tracer::LEVEL1,
                "Exception: Unknown Exception caught...");
            CMSetStatus(rc, CMPI_RC_ERR_FAILED);
            PEG_METHOD_EXIT();
            return NULL;
        }

        CMSetStatus(rc,CMPI_RC_OK);
        PEG_METHOD_EXIT();
        return string2CMPIString(pgOwningEntity);
    }
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:51,代码来源:CMPI_Error.cpp

示例5: PEG_METHOD_ENTER

void ProviderAgent::_writeResponse(Message* message)
{
    PEG_METHOD_ENTER(TRC_PROVIDERAGENT, "ProviderAgent::_writeResponse");

    CIMMessage* response = dynamic_cast<CIMMessage*>(message);
    PEGASUS_ASSERT(response != 0);

    //
    // Write the response message to the pipe
    //
    try
    {
        // Use Mutex to prevent concurrent writes to the same pipe
        AutoMutex pipeLock(_pipeToServerMutex);

        AnonymousPipe::Status writeStatus =
            _pipeToServer->writeMessage(response);

        if (writeStatus != AnonymousPipe::STATUS_SUCCESS)
        {
            PEG_TRACE_CSTRING(TRC_PROVIDERAGENT, Tracer::LEVEL1,
                "Error writing response to pipe.");
            Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
                MessageLoaderParms(
                    "ProviderManager.ProviderAgent.ProviderAgent."
                        "CIMSERVER_COMMUNICATION_FAILED",
                    "cimprovagt \"$0\" communication with CIM Server failed.  "
                        "Exiting.",
                    _agentId));
            _terminating = true;
        }
    }
    catch (...)
    {
        PEG_TRACE_CSTRING(TRC_PROVIDERAGENT, Tracer::LEVEL1,
            "Caught exception while writing response.");
        Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
            MessageLoaderParms(
                "ProviderManager.ProviderAgent.ProviderAgent."
                    "CIMSERVER_COMMUNICATION_FAILED",
                "cimprovagt \"$0\" communication with CIM Server failed.  "
                    "Exiting.",
                _agentId));
        _terminating = true;
    }

    PEG_METHOD_EXIT();
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:48,代码来源:ProviderAgent.cpp

示例6: sbcGetCount

 CMPICount sbcGetCount(const CMPISubCond* eSbc, CMPIStatus* rc)
 {
     PEG_METHOD_ENTER(
         TRC_CMPIPROVIDERINTERFACE,
         "CMPI_SubCond:sbcGetCount()");
     const CMPI_SubCond *sbc = (CMPI_SubCond*)eSbc->hdl;
     if( !sbc )
     {
         PEG_TRACE_CSTRING(
             TRC_CMPIPROVIDERINTERFACE,
             Tracer::LEVEL1,
             "Invalid handle in CMPI_SubCond:sbcGetCount");
         CMSetStatus(rc, CMPI_RC_ERR_INVALID_HANDLE);
         PEG_METHOD_EXIT();
         return 0;
     }
     CMPI_TableauRow* row = (CMPI_TableauRow* )sbc->priv;
     CMSetStatus(rc,CMPI_RC_OK);
     if( row )
     {
         PEG_METHOD_EXIT();
         return row->size();
     }
     PEG_METHOD_EXIT();
     return 0;
 }
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:26,代码来源:CMPI_SubCond.cpp

示例7: LoggerRep

void Logger::_putInternal(
    LogFileType logFileType,
    const String& systemId,
    const Uint32 logComponent, // FUTURE: Support logComponent mask
    Uint32 logLevel,
    const String& message)
{
    if (!_rep)
       _rep = new LoggerRep(_homeDirectory);

    // Call the actual logging routine is in LoggerRep.
    _rep->log(logFileType, systemId, logLevel, message);

    // PEP 315
    // The trace can be routed into the log. The logged trace messages are
    // logged with logFileType of Logger::TRACE_LOG.
    // To avoid a cirular writing of these messages, log messages with
    // logFileType of Logger::TRACE_LOG are never send to the trace.
    if (Logger::TRACE_LOG != logFileType)
    {
        // For all other logFileType's send the log messages to the trace.
        // But do not write log messages to trace when the trace facility is
        // set to log. This avoids double messages.
        if (Tracer::TRACE_FACILITY_LOG != Tracer::getTraceFacility())
        {
            PEG_TRACE_CSTRING(
                TRC_LOGMSG,
                Tracer::LEVEL1,
                (const char*) message.getCString());
        }
    }
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:32,代码来源:Logger.cpp

示例8: PEG_METHOD_ENTER

/** Initializes the consumer.
 *  Caller assumes responsibility for catching exceptions thrown by this method.
 */
void DynamicConsumer::initialize()
{
    PEG_METHOD_ENTER(TRC_LISTENER, "DynamicConsumer::initialize");

    if (!_initialized)
    {
        try
        {
            //there is no cimom handle in the listener, so pass null
            CIMOMHandle* handle = 0;
            DynamicConsumerFacade::initialize(*(handle));

            updateIdleTimer();
            _initialized = true;

            PEG_TRACE_CSTRING(
                TRC_LISTENER,
                Tracer::LEVEL3,
                "Successfully initialized consumer.");

        } catch (...)
        {
            PEG_TRACE((TRC_LISTENER,Tracer::LEVEL1,
                "Exception caught in DynamicConsumerFacade::initialize for %s",
                (const char*)_name.getCString()));
            throw;
        }
    }

    PEG_METHOD_EXIT();
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:34,代码来源:DynamicConsumer.cpp

示例9: ClientCIMOMHandleAccessController

 ClientCIMOMHandleAccessController(Mutex& lock)
     : _lock(lock)
 {
     try
     {
         // assume default client timeout
         if (!_lock.timed_lock(PEGASUS_DEFAULT_CLIENT_TIMEOUT_MILLISECONDS))
         {
             throw CIMException(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(
                 "Provider.CIMOMHandle.CIMOMHANDLE_TIMEOUT",
                 "Timeout waiting for CIMOMHandle"));
         }
     }
     catch (Exception& e)
     {
         PEG_TRACE((TRC_CIMOM_HANDLE, Tracer::LEVEL2,
             "Unexpected Exception: %s",
             (const char*)e.getMessage().getCString()));
         throw;
     }
     catch (...)
     {
         PEG_TRACE_CSTRING(TRC_CIMOM_HANDLE, Tracer::LEVEL2,
             "Unexpected exception");
         throw;
     }
 }
开发者ID:rdobson,项目名称:openpegasus,代码行数:27,代码来源:ClientCIMOMHandleRep.cpp

示例10: PEG_METHOD_ENTER

Boolean DefaultProviderManager::hasActiveProviders()
{
    PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
        "DefaultProviderManager::hasActiveProviders");

    try
    {
        AutoMutex lock(_providerTableMutex);
        PEG_TRACE((TRC_PROVIDERMANAGER, Tracer::LEVEL4,
            "Number of providers in _providers table = %d", _providers.size()));

        // Iterate through the _providers table looking for an active provider
        for (ProviderTable::Iterator i = _providers.start(); i != 0; i++)
        {
            if (i.value()->status.isInitialized())
            {
                PEG_METHOD_EXIT();
                return true;
            }
        }
    }
    catch (...)
    {
        // Unexpected exception; do not assume that no providers are loaded
        PEG_TRACE_CSTRING(TRC_PROVIDERMANAGER, Tracer::LEVEL1,
            "Unexpected Exception in hasActiveProviders.");
        PEG_METHOD_EXIT();
        return true;
    }

    // No active providers were found in the _providers table
    PEG_METHOD_EXIT();
    return false;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:34,代码来源:DefaultProviderManager.cpp

示例11: PEG_METHOD_ENTER

void SystemLogListenerDestination::_writeToSystemLog(
    const String& identifier,
    Uint32 severity,
    const String& formattedText)
{
    PEG_METHOD_ENTER(TRC_IND_HANDLER,
        "SystemLogListenerDestination::_writeToSystemLog");

#if defined(PEGASUS_USE_SYSLOGS)

    System::syslog(identifier, severity, formattedText.getCString());

#else

    PEG_TRACE_CSTRING(TRC_INDICATION_GENERATION, Tracer::LEVEL3,
       "SystemLogListenerDestination writing to PegasusStandard.log");
    // PEGASUS_USE_SYSLOGS is not defined, writes the formatted
    // indications into PegasusStandard.log file
    Logger::put(Logger::STANDARD_LOG , identifier, severity,
        (const char*)formattedText.getCString());

#endif

    PEG_METHOD_EXIT();

}
开发者ID:brunolauze,项目名称:pegasus,代码行数:26,代码来源:SystemLogListenerDestination.cpp

示例12: PEGASUS_ASSERT

void HTTPAcceptor::unbind()
{
    if (_rep)
    {
        _portNumber = 0;
        _rep->closeSocket();

        if (_connectionType == LOCAL_CONNECTION)
        {
#ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
            ::unlink(
                reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);
#else
            PEGASUS_ASSERT(false);
#endif
        }

        delete _rep;
        _rep = 0;
    }
    else
    {
        PEG_TRACE_CSTRING(TRC_HTTP, Tracer::LEVEL1,
            "HTTPAcceptor::unbind failure _rep is null." );
    }
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:26,代码来源:HTTPAcceptor.cpp

示例13: errSetOtherErrorSourceFormat

    static CMPIStatus errSetOtherErrorSourceFormat(
        CMPIError* eErr, 
        const char* otherErrorSourceFormat)
    {
        PEG_METHOD_ENTER(
            TRC_CMPIPROVIDERINTERFACE,
            "CMPI_Error:errSetOtherErrorSourceFormat()");
        CIMError* cer=(CIMError*)eErr->hdl;
        if (!cer)
        {
            PEG_METHOD_EXIT();
            CMReturn(CMPI_RC_ERR_INVALID_PARAMETER);
        }

        String pgOtherErrorSourceFormat(otherErrorSourceFormat);

        try
        {
            cer->setOtherErrorSourceFormat(pgOtherErrorSourceFormat);
        }
        catch (...)
        {
            PEG_TRACE_CSTRING(
                TRC_CMPIPROVIDERINTERFACE,
                Tracer::LEVEL1,
                "Exception: Unknown Exception received...");
            PEG_METHOD_EXIT();
            CMReturn(CMPI_RC_ERR_FAILED);
        }

        PEG_METHOD_EXIT();
        CMReturn(CMPI_RC_OK);
    }
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:33,代码来源:CMPI_Error.cpp

示例14: PEG_TRACE_CSTRING

void IndicationDispatchEvent::increaseRetries()
{
    PEG_TRACE_CSTRING(TRC_LISTENER, Tracer::LEVEL4, "Increasing retries\n");
    _retries++;
    _lastAttemptTime = CIMDateTime::getCurrentDateTime();
    PEG_TRACE((TRC_LISTENER,Tracer::LEVEL4,"Last attempt time %s",
        (const char*)_lastAttemptTime.toString().getCString()));
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:8,代码来源:DynamicConsumer.cpp

示例15: PEG_METHOD_ENTER

void CIMExportClient::exportIndication(
   const String& url,
   const CIMInstance& instanceName,
   const ContentLanguageList& contentLanguages)
{
    PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::exportIndication()");

    try
    {
        // encode request
        CIMRequestMessage* request = new CIMExportIndicationRequestMessage(
            String::EMPTY,
            url,
            instanceName,
            QueueIdStack(),
            String::EMPTY,
            String::EMPTY);

        request->operationContext.set
            (ContentLanguageListContainer(contentLanguages));

        PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,
            "Exporting %s Indication for destination %s:%d%s",
            (const char*)(instanceName.getClassName().getString().
            getCString()),
            (const char*)(_connectHost.getCString()), _connectPortNumber,
            (const char*)(url.getCString())));

        Message* message = _doRequest(request,
            CIM_EXPORT_INDICATION_RESPONSE_MESSAGE);

        PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,
            "%s Indication for destination %s:%d%s exported successfully",
            (const char*)(instanceName.getClassName().getString().
            getCString()),
            (const char*)(_connectHost.getCString()), _connectPortNumber,
            (const char*)(url.getCString())));

        CIMExportIndicationResponseMessage* response =
            (CIMExportIndicationResponseMessage*)message;

        AutoPtr<CIMExportIndicationResponseMessage> ap(response);
    }
    catch (const Exception& e)
    {
        PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
            "Failed to export indication: %s",
            (const char*)e.getMessage().getCString()));
        throw;
    }
    catch (...)
    {
        PEG_TRACE_CSTRING (TRC_DISCARDED_DATA, Tracer::LEVEL1,
            "Failed to export indication");
        throw;
    }
    PEG_METHOD_EXIT();
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:58,代码来源:CIMExportClient.cpp


注:本文中的PEG_TRACE_CSTRING函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。