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


C++ LOG0函数代码示例

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


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

示例1: KineticClient_CreateOperation

static KineticStatus KineticClient_CreateOperation(
    KineticOperation** operation,
    KineticSessionHandle handle)
{
    if (handle == KINETIC_HANDLE_INVALID) {
        LOG0("Specified session has invalid handle value");
        return KINETIC_STATUS_SESSION_EMPTY;
    }

    KineticConnection* connection = KineticConnection_FromHandle(handle);
    if (connection == NULL) {
        LOG0("Specified session is not associated with a connection");
        return KINETIC_STATUS_SESSION_INVALID;
    }

    LOGF1("\n"
         "--------------------------------------------------\n"
         "Building new operation on connection @ 0x%llX", connection);

    *operation = KineticAllocator_NewOperation(connection);
    if (*operation == NULL) {
        return KINETIC_STATUS_MEMORY_ERROR;
    }
    if ((*operation)->request == NULL) {
        return KINETIC_STATUS_NO_PDUS_AVAVILABLE;
    }

    return KINETIC_STATUS_SUCCESS;
}
开发者ID:atomicobject,项目名称:kinetic-c,代码行数:29,代码来源:kinetic_client.c

示例2: LOG

void CMLauncherAppUi::PlaylistTransferCompleteL()
{
	LOG(ELogGeneral,1,"PlaylistTransferCompleteL: start");

	iActiveViews&=~EFiletransferViewActive;
	if(iCurrentView==iFiletransferView)
	{
		//we need to switch to a diferent vierw, e.g. list view
		LOG0("Activating list view");
		SwitchViewL(iListView);
		LOG0("List view activated");
	}/*
	else
	{
		//no need to switch view, but we must take care of the navi menu (may need replacing with exit)
		ChangeExitWithNaviL(-1);
	};*/

	Clean(ETrue);//this function performs asynchronously

    //update the view
    if(iDirection==EDirectionReceiving)
    	UpdateView();

	LOG(ELogGeneral,-1,"PlaylistTransferCompleteL: end");
};
开发者ID:lohanf,项目名称:MLauncher,代码行数:26,代码来源:MLauncherAppUi.cpp

示例3: logMsg

/** @brief Log a message from the Python.
 *
 * In AQUAgpusph the Python stdout and stderr are redirected to this function,
 * such that:
 *     - stdout messages will be logged with level 0
 *     - stderr messages will be logged with level 3
 * @param self Module.
 * @param args Positional arguments.
 * @param keywds Keyword arguments.
 * @return Computed value, NULL if errors have been detected.
 */
static PyObject* logMsg(PyObject *self, PyObject *args, PyObject *keywds)
{
    int level;
    const char* msg;

    static char *kwlist[] = {"log_level", "message", NULL};

    if (!PyArg_ParseTupleAndKeywords(args, keywds, "is", kwlist,
                                     &level, &msg)){
        return NULL;
    }

    switch(level) {
        case 0:
            LOG0(Aqua::L_DEBUG, msg); break;
        case 1:
            LOG0(Aqua::L_INFO, msg); break;
        case 2:
            LOG0(Aqua::L_WARNING, msg); break;
        case 3:
            LOG0(Aqua::L_ERROR, msg); break;            
    }

    Py_RETURN_NONE;
}
开发者ID:sanguinariojoe,项目名称:aquagpusph,代码行数:36,代码来源:Python.cpp

示例4: KineticController_HandleUnexpectedResponse

void KineticController_HandleUnexpectedResponse(void *msg,
        int64_t seq_id,
        void *bus_udata,
        void *socket_udata)
{
    KineticResponse * response = msg;
    KineticSession* session = socket_udata;
    bool connetionInfoReceived = false;
    char const * statusTag = "[PDU RX STATUS]";
    char const * unexpectedTag = "[PDU RX UNEXPECTED]";
    char const * logTag = unexpectedTag;
    int logAtLevel, protoLogAtLevel;

    (void)bus_udata;

    // Handle unsolicited status PDUs
    if (response->proto->authtype == COM__SEAGATE__KINETIC__PROTO__MESSAGE__AUTH_TYPE__UNSOLICITEDSTATUS) {
        int64_t connectionID = KineticResponse_GetConnectionID(response);
        if (connectionID != 0)
        {
            // Store connectionID from unsolicited status message in the session for future requests
            KineticSession_SetConnectionID(session, connectionID);
            LOGF2("Extracted connection ID from unsolicited status PDU (id=%lld)", connectionID);
            connetionInfoReceived = true;
            logTag = statusTag;
            logAtLevel = 2;
            protoLogAtLevel = 3;
        }
        else {
            LOG0("WARNING: Unsolicited status received. Connection being terminated by remote!");
            logTag = statusTag;
            logAtLevel = 0;
            protoLogAtLevel = 0;
            KineticStatus status = KineticResponse_GetStatus(response);
            KineticSession_SetTerminationStatus(session, status);
        }
    }
    else {
        LOG0("WARNING: Received unexpected response!");
        logTag = unexpectedTag;
        logAtLevel = 0;
        protoLogAtLevel = 0;
    }

    KineticLogger_LogPrintf(logAtLevel, "%s pdu: %p, session: %p, bus: %p, "
                            "fd: %6d, seq: %8lld, protoLen: %8u, valueLen: %8u",
                            logTag,
                            (void*)response, (void*)session,
                            (void*)session->messageBus,
                            session->socket, (long long)seq_id,
                            KineticResponse_GetProtobufLength(response),
                            KineticResponse_GetValueLength(response));
    KineticLogger_LogProtobuf(protoLogAtLevel, response->proto);

    KineticAllocator_FreeKineticResponse(response);

    if (connetionInfoReceived) {
        KineticResourceWaiter_SetAvailable(&session->connectionReady);
    }
}
开发者ID:rcrane,项目名称:kinetic-c,代码行数:60,代码来源:kinetic_controller.c

示例5: KineticSession_Create

KineticStatus KineticSession_Create(KineticSession * const session, KineticClient * const client)
{
    if (session == NULL) {
        LOG0("Session is NULL");
        return KINETIC_STATUS_SESSION_EMPTY;
    }

    if (client == NULL) {
        LOG0("Client is NULL");
        return KINETIC_STATUS_SESSION_EMPTY;
    }

    session->connected = false;
    session->socket = KINETIC_SOCKET_INVALID;

    // initialize session send mutex
    if (pthread_mutex_init(&session->sendMutex, NULL) != 0) {
        LOG0("Failed initializing session send mutex!");
        return KINETIC_STATUS_MEMORY_ERROR;
    }

    session->outstandingOperations =
        KineticCountingSemaphore_Create(KINETIC_MAX_OUTSTANDING_OPERATIONS_PER_SESSION);
    if (session->outstandingOperations == NULL) {
        LOG0("Failed creating session counting semaphore!");
        return KINETIC_STATUS_MEMORY_ERROR;
    }

    return KINETIC_STATUS_SUCCESS;
}
开发者ID:rcrane,项目名称:kinetic-c,代码行数:30,代码来源:kinetic_session.c

示例6: LOG0

bool IODicom<T>::ReadMetaData(PGCore::BaseDataObject *oMetaDataObject, const IOParams &iParams)
{
    const std::vector<std::string>& iPaths = iParams.Source();
    if (iPaths.empty())
    {
        LOG0("IO/IODicom::ReadMetaData: Invalid input filename vector.");
        return false;
    }
    const std::string &iFileName = iPaths[0];
    if (iFileName.empty())
    {
        LOG0("IO/IODicom::ReadMetaData: Invalid input filename.");
        return false;
    }

    //this is where to read the image in
    PGCore::MetaData<T> *oMetaData = (static_cast<PGCore::MetaData< T > *>(oMetaDataObject));
    if (!oMetaData)
    {
        LOG0("IO/IOBase::ReadMetaData: Invalid output container for metadata.");
        return false;
    }

    return GetAttributes(*oMetaData, iFileName);
}
开发者ID:yangguang-ecnu,项目名称:smisdk,代码行数:25,代码来源:IODicom.hpp

示例7: LOG0

SQLCode::SQLCode()
{
	LOG0(SourceInfo, DebugUtil::DebugSQL,"Begin build the Hash table...");

	m_pSqlFileHelper = new SQLFileHelper();

	LOG0(SourceInfo, DebugUtil::DebugSQL,"End build the Hash table...");
}
开发者ID:shenglonglin2000,项目名称:MT,代码行数:8,代码来源:SQLCode.cpp

示例8: KineticClient_DestroySession

KineticStatus KineticClient_DestroySession(KineticSession* const session)
{
    if (session == NULL) {
        LOG0("KineticSession is NULL!");
        return KINETIC_STATUS_SESSION_INVALID;
    }

    KineticStatus status = KineticSession_Disconnect(session);
    if (status != KINETIC_STATUS_SUCCESS) {LOG0("Disconnection failed!");}
    KineticSession_Destroy(session);

    return status;
}
开发者ID:Abioy,项目名称:kinetic-c,代码行数:13,代码来源:kinetic_client.c

示例9: KineticSession_Connect

KineticStatus KineticSession_Connect(KineticSession * const session)
{
    if (session == NULL) {
        return KINETIC_STATUS_SESSION_EMPTY;
    }

    // Establish the connection
    KINETIC_ASSERT(strlen(session->config.host) > 0);
    session->socket = KineticSocket_Connect(
        session->config.host, session->config.port);
    if (session->socket == KINETIC_SOCKET_DESCRIPTOR_INVALID) {
        LOG0("Session connection failed!");
        session->socket = KINETIC_SOCKET_DESCRIPTOR_INVALID;
        session->connected = false;
        return KINETIC_STATUS_CONNECTION_ERROR;
    }
    session->connected = true;

    bus_socket_t socket_type = session->config.useSsl ? BUS_SOCKET_SSL : BUS_SOCKET_PLAIN;
    session->si = calloc(1, sizeof(socket_info) + 2 * PDU_PROTO_MAX_LEN);
    if (session->si == NULL) { return KINETIC_STATUS_MEMORY_ERROR; }
    bool success = Bus_RegisterSocket(session->messageBus, socket_type, session->socket, session);
    if (!success) {
        LOG0("Failed registering connection with client!");
        goto connection_error_cleanup;
    }

    // Wait for initial unsolicited status to be received in order to obtain connection ID
    success = KineticResourceWaiter_WaitTilAvailable(&session->connectionReady, KINETIC_CONNECTION_TIMEOUT_SECS);
    if (!success) {
        LOG0("Timed out waiting for connection ID from device!");
        goto connection_error_cleanup;
    }
    LOGF1("Received connection ID %lld for session %p",
        (long long)KineticSession_GetConnectionID(session), (void*)session);

    return KINETIC_STATUS_SUCCESS;

connection_error_cleanup:

    if (session->si != NULL) {
        free(session->si);
        session->si = NULL;
    }
    if (session->socket != KINETIC_SOCKET_DESCRIPTOR_INVALID) {
        KineticSocket_Close(session->socket);
        session->socket = KINETIC_SOCKET_DESCRIPTOR_INVALID;
    }
    session->connected = false;
    return KINETIC_STATUS_CONNECTION_ERROR;
}
开发者ID:rcrane,项目名称:kinetic-c,代码行数:51,代码来源:kinetic_session.c

示例10: gInitStructuredExceptionHandler

        void gInitStructuredExceptionHandler()
        {
            // TODO LPP: Should we use a thread local variable to ensure we only call
            // _set_se_translator() once per thread?  Does _set_se_translator() already do this?

            static bool shouldSetSeTranslator = RunParams::getInstance().isSet(RPARAM_DEBUGLOGSTACKTRACE);
            if (shouldSetSeTranslator)
            {
                LOG0(SourceInfo, DebugUtil::DebugDebug, "gInitStructuredExceptionHandler(): calling _set_se_translator()");
                _set_se_translator( translator_func );
            }
            else
            {
                LOG0(SourceInfo, DebugUtil::DebugDebug, "gInitStructuredExceptionHandler(): NOT calling _set_se_translator()");
            }
        }
开发者ID:lslProjectOrg,项目名称:Projects,代码行数:16,代码来源:DebugSETranslator.cpp

示例11: LOG0

BOOL CAuthenticationPg::OnInitDialog() {
	LOG0(3, "CAuthenticationPg::OnInitDialog()");

	CPropertyPage::OnInitDialog();

	return TRUE;
}
开发者ID:Tallefer,项目名称:prssr,代码行数:7,代码来源:AuthenticationDlg.cpp

示例12: ASSERT

//---------------------------------------------------------------------------
//
//	セーブ
//
//---------------------------------------------------------------------------
int FASTCALL CRTC::Save(Fileio *fio, int ver)
{
	size_t sz;

	ASSERT(this);
	ASSERT(fio);
	LOG0(Log::Normal, "セーブ");

	// サイズをセーブ
	sz = sizeof(crtc_t);
	if (!fio->Write(&sz, sizeof(sz))) {
		return FALSE;
	}

	// 実体をセーブ
	if (!fio->Write(&crtc, (int)sz)) {
		return FALSE;
	}

	// イベントをセーブ
	if (!event.Save(fio, ver)) {
		return FALSE;
	}

	return TRUE;
}
开发者ID:ysei,项目名称:XM6_pid,代码行数:31,代码来源:crtc.cpp

示例13: SetValue

	bool ErosionKernel<T, U>::Initialize_()
	{
		if (m_radius<=0.0f)
		{
			return false;
		}

		// fill up the buffer here
		int i=0;

		// fill circle

		
		/*for (i=0;i<(m_dimension);i++) 
		{
			SetValue(0, i, 1);
		}*/
		
		bool res = drawCircle(m_dimension/2, m_dimension/2, m_radius, m_buffer);
		if (!res) return false;

#ifdef _DEBUG
		if (0)
		{
			LOG1("The filter coefficients are (radius: %d):", m_radius);
			for(int j=0;j<(m_dimension);j++)
			{
				LOG0("\n");
				for(i=0;i<(m_dimension);i++)
					LOG3("Kernel[%d][%d] = %f", j, i, (double)GetValue(j, i));
			}
		}
#endif
		return true;
	}
开发者ID:yangguang-ecnu,项目名称:smisdk,代码行数:35,代码来源:ErosionKernel.hpp

示例14: LOG0

void CPropCachingPg::UpdateControls() {
	LOG0(3, "CPropCachingPg::UpdateControls()");

	if (m_ctlSpecificCaching.GetCheck() == BST_CHECKED) {
		m_ctlStoreImages.EnableWindow();
		m_ctlCacheOnlineContent.EnableWindow();
	}
	else {
		m_ctlStoreImages.EnableWindow(FALSE);
		m_ctlCacheOnlineContent.EnableWindow(FALSE);
	}

	if (m_ctlCacheEnclosures.GetCheck() == BST_CHECKED) {
		m_ctlEnclosureLimit.EnableWindow();
		m_ctlLargerLbl.EnableWindow();
		m_ctlEnclosureLimitSpin.EnableWindow();
		m_ctlMB.EnableWindow();
		m_ctlMBLbl.EnableWindow();
	}
	else {
		m_ctlEnclosureLimit.EnableWindow(FALSE);
		m_ctlLargerLbl.EnableWindow(FALSE);
		m_ctlEnclosureLimitSpin.EnableWindow(FALSE);
		m_ctlMB.EnableWindow(FALSE);
		m_ctlMBLbl.EnableWindow(FALSE);
	}
}
开发者ID:Tallefer,项目名称:prssr,代码行数:27,代码来源:PropCachingPg.cpp

示例15: EnterCriticalSection

	//  0: false, not in async mode
	//  1: true
	int AsyncProcess::NotifyError(const char *iMsg/*=0*/)
	{
		if (!m_pProcess) return false;
		if (!m_pProcess->GetAsyncEnabled()) return false;
		//if (!ioAsyncLoadMT) return 0;

		EnterCriticalSection(&m_csMT);
		m_threadsRemaining--;
		LeaveCriticalSection(&m_csMT);
		
		if (m_threadsRemaining>0) 
		{
			LOG1("%d threads remaining. One of them reported error. Killing all..", m_threadsRemaining);
		} else
		{
			LOG0("A thread reported error. Killing all..");
		}

		for (int i=0; i<m_numThreadsMT; i++)
		{				
			//if (m_thread[i].IsAlive())
			{					
				m_thread[i].CloseThread();
				LOG1("Closed thread with threadHandle [%d]", m_hThreadMT[i]);
			}
		}

		return 1;
	}
开发者ID:yangguang-ecnu,项目名称:smisdk,代码行数:31,代码来源:AsyncProcess.cpp


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