• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LogWarning函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setEnabled

void MessageCarbons::onDiscoInfoReceived(const IDiscoInfo &AInfo)
{
	if (AInfo.node.isEmpty() && AInfo.contactJid==AInfo.streamJid.domain() && !FEnabled.contains(AInfo.streamJid))
	{
		FEnabled.insert(AInfo.streamJid,false);
		if (AInfo.features.contains(NS_MESSAGE_CARBONS))
			setEnabled(AInfo.streamJid,true);
		else
			LogWarning(QString("[MessageCarbons] Message Carbons does not supported by '%1'").arg(AInfo.streamJid.full()));
	}
}
开发者ID:Rambler-ru,项目名称:Contacts,代码行数:11,代码来源:messagecarbons.cpp


示例2: LogWarning

void InputAPI::UnregisterInputContextRaw(const String &name)
{
    for(auto iter = untrackedInputContexts.Begin();
        iter != untrackedInputContexts.End(); ++iter)
        if ((*iter)->Name() == name)
        {
            untrackedInputContexts.Erase(iter);
            return;
        }
    LogWarning("Failed to delete non-refcounted Input Context \"" + name + "\": an Input Context with that name doesn't exist!");
}
开发者ID:aoighost,项目名称:tundra-urho3d,代码行数:11,代码来源:InputAPI.cpp


示例3: LogWarning

void AssetRefListener::HandleAssetRefChange(IAttribute *assetRef, const String& assetType)
{
    Attribute<AssetReference> *attr = dynamic_cast<Attribute<AssetReference> *>(assetRef);
    if (!attr)
    {
        LogWarning("AssetRefListener::HandleAssetRefChange: Attribute's type not AssetReference (was " +
            (assetRef == 0 ? "null" : assetRef->TypeName()) + " instead).");
        return;
    }
    HandleAssetRefChange(attr->Owner()->GetFramework()->Asset(), attr->Get().ref, assetType);
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:11,代码来源:AssetRefListener.cpp


示例4: GetInternalAttributeIndex

void EC_DynamicComponent::SetAttribute(int index, const QVariant &value, AttributeChange::Type change)
{
    int attrIndex = GetInternalAttributeIndex(index);
    if (attrIndex < 0)
    {
        LogWarning("Cannot set attribute, index out of bounds");
        return;
    }
    
    attributes[attrIndex]->FromQVariant(value, change);
}
开发者ID:Pouique,项目名称:naali,代码行数:11,代码来源:EC_DynamicComponent.cpp


示例5: LogWarning

void CMMDVMHost::readParams()
{
	m_dstarEnabled = m_conf.getDStarEnabled();
	m_dmrEnabled   = m_conf.getDMREnabled();
	m_ysfEnabled   = m_conf.getFusionEnabled();

	if (!m_conf.getDuplex() && m_dmrEnabled) {
		LogWarning("DMR operation disabled because system is not duplex");
		m_dmrEnabled = false;
	}
}
开发者ID:mathisschmieder,项目名称:OpenDV,代码行数:11,代码来源:MMDVMHost.cpp


示例6: if

data_OCTAVE_DIS Att::StrToOctaveDis(std::string value)
{
    if (value == "8") return OCTAVE_DIS_8;
    else if (value == "15") return OCTAVE_DIS_15;
    else if (value == "22") return OCTAVE_DIS_22;
    else {
        LogWarning("Unsupported octave dis '%s'", value.c_str() );
    }
    // default
    return OCTAVE_DIS_NONE;
}
开发者ID:maximumspatium,项目名称:verovio,代码行数:11,代码来源:att.cpp


示例7: main

int main(int argc, const char * argv[])
{
    CreateLog();
    
    LogWarning("Warning message example with number = %d", 1);
    LogError("Error message example with number = %d", 2);
    LogInfo("Info message example with number = %d", 3);
    LogDebug("Debug message example with number = %d", 4);
    
    return 0;
}
开发者ID:wunderkopf,项目名称:Logger,代码行数:11,代码来源:main.cpp


示例8: LogWarning

void ConsoleAPI::UnregisterCommand(const QString &name)
{
    CommandMap::iterator it = commands.find(name);
    if (it == commands.end())
    {
        LogWarning("ConsoleAPI: Trying to unregister non-existing command " + name + ".");
        return;
    }

    commands.erase(it);
}
开发者ID:Pouique,项目名称:naali,代码行数:11,代码来源:ConsoleAPI.cpp


示例9: UNREFERENCED_PARAMETER

int CEMSocket::OnLayerCallback(const CAsyncSocketExLayer *pLayer, int nType, int nCode, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(wParam);
    ASSERT( pLayer );
    if (nType == LAYERCALLBACK_STATECHANGE)
    {
        /*CString logline;
        if (pLayer==m_pProxyLayer)
        {
        	//logline.Format(_T("ProxyLayer changed state from %d to %d"), wParam, nCode);
        	//AddLogLine(false,logline);
        }else
        	//logline.Format(_T("Layer @ %d changed state from %d to %d"), pLayer, wParam, nCode);
        	//AddLogLine(false,logline);*/
        return 1;
    }
    else if (nType == LAYERCALLBACK_LAYERSPECIFIC)
    {
        if (pLayer == m_pProxyLayer)
        {
            switch (nCode)
            {
            case PROXYERROR_NOCONN:
                // We failed to connect to the proxy.
                m_bProxyConnectFailed = true;
                /* fall through */
            case PROXYERROR_REQUESTFAILED:
                // We are connected to the proxy but it failed to connect to the peer.
                if (thePrefs.GetVerbose())
                {
                    m_strLastProxyError = GetProxyError(nCode);
                    if (lParam && ((LPCSTR)lParam)[0] != '\0')
                    {
                        m_strLastProxyError += _T(" - ");
                        m_strLastProxyError += (LPCSTR)lParam;
                    }
                    // Appending the Winsock error code is actually not needed because that error code
                    // gets reported by to the original caller anyway and will get reported eventually
                    // by calling 'GetFullErrorMessage',
                    /*if (wParam) {
                    	CString strErrInf;
                    	if (GetErrorMessage(wParam, strErrInf, 1))
                    		m_strLastProxyError += _T(" - ") + strErrInf;
                    }*/
                }
                break;
            default:
                m_strLastProxyError = GetProxyError(nCode);
                LogWarning(false, _T("Proxy-Error: %s"), m_strLastProxyError);
            }
        }
    }
    return 1;
}
开发者ID:techpub,项目名称:archive-code,代码行数:54,代码来源:EMSocket.cpp


示例10: CStatus

Font::Font(const TString& filename, int pitch) : CStatus(){
	SetClassName("Font");
	font = 0;
	if (!ttf_initialized)
		if (TTF_Init() != 0){
			SetStatus(STATUS_ERROR);
			LogWarning("Could not initialize libSDL_ttf");
			return;
			}
	ttf_initialized = true;

	font = TTF_OpenFont(filename.text(),pitch);
	if (!font){
			SetStatus(STATUS_ERROR);
			LogWarning("Could not load font %s",filename.text());
			return;
			}

	setColor(255,255,255);
}
开发者ID:BackupTheBerlios,项目名称:apokalypse,代码行数:20,代码来源:font.cpp


示例11: CreateRegistrationReceipt

bool SyncManagerImpl::RegisterListener(SyncListener* listener)
{
	if (listener)
	{
		// If we do not already have a listener...
		if (!m_listener)
		{
			// If the listener is not already registered...
			if (!listener->IsRegistered())
			{
				m_listener = listener;
				RegistrationReceiptPtr receipt = CreateRegistrationReceipt(SyncManagerImplPtr(this), &SyncManagerImpl::UnregisterListener, listener);
				m_listener->AddRegistration(receipt, receipt->GetKey());
				return true;
			}
			else
			{
				LogError("Trying to register a listener that has already been registered");
				return false;
			}
		}
		else
		{
			if (m_listener == listener)
			{
				LogWarning("SyncListener registration failed because the given listener is already registered");
			}
			else
			{
				LogWarning("SyncListener registration failed because another listener is already registered");
			}

			return false;
		}
	}
	else
	{
		LogError("Trying to register a NULL pointer");
		return false;
	}
}
开发者ID:Darrenbydesign,项目名称:HoloToolkit,代码行数:41,代码来源:SyncManagerImpl.cpp


示例12: LogInfo

OpenJabNab::OpenJabNab(int argc, char ** argv):QCoreApplication(argc, argv)
{
	GlobalSettings::Init();
	LogInfo("-- OpenJabNab Start --");
	TTSManager::Init();
	BunnyManager::Init();
	Bunny::Init();
	ZtampManager::Init();
	Ztamp::Init();
	AccountManager::Init();
	NetworkDump::Init();
	PluginManager::Init();
	BunnyManager::LoadBunnies();
	ZtampManager::LoadZtamps();

	if(GlobalSettings::Get("Config/HttpListener", true) == true)
	{
		// Create Listeners
		httpListener = new QTcpServer(this);
		httpListener->listen(QHostAddress::LocalHost, GlobalSettings::GetInt("OpenJabNabServers/ListeningHttpPort", 8080));
		connect(httpListener, SIGNAL(newConnection()), this, SLOT(NewHTTPConnection()));
	}
	else
		LogWarning("Warning : HTTP Listener is disabled !");

	if(GlobalSettings::Get("Config/XmppListener", true) == true)
	{
		xmppListener = new QTcpServer(this);
		xmppListener->listen(QHostAddress::Any, GlobalSettings::GetInt("OpenJabNabServers/XmppPort", 5222));
		connect(xmppListener, SIGNAL(newConnection()), this, SLOT(NewXMPPConnection()));
	}
	else
		LogWarning("Warning : XMPP Listener is disabled !");

	httpApi = GlobalSettings::Get("Config/HttpApi", true).toBool();
	httpViolet = GlobalSettings::Get("Config/HttpViolet", true).toBool();
	standAlone = GlobalSettings::Get("Config/StandAlone", true).toBool();
	LogInfo(QString("Parsing of HTTP Api is ").append((httpApi == true)?"enabled":"disabled"));
	LogInfo(QString("Parsing of HTTP Bunny messages is ").append((httpViolet == true)?"enabled":"disabled"));
	LogInfo(QString("Current mode is ").append((standAlone == true)?"standalone":"connected to Violet"));
}
开发者ID:Laurent207,项目名称:OpenJabNab,代码行数:41,代码来源:openjabnab.cpp


示例13: LogWarning

sp<PaletteImage> RawImage::load(Data &data, const UString &filename, const Vec2<int> &size)
{
	auto infile = data.fs.open(filename);
	if (!infile)
	{
		LogWarning("Failed to open file \"%s\"", filename.cStr());
		return nullptr;
	}
	if (size.x <= 0 || size.y <= 0)
	{
		LogWarning("Trying to read image of invalid size {%d,%d}", size.x, size.y);
		return nullptr;
	}

	if (infile.size() != static_cast<size_t>(size.x * size.y))
	{
		LogWarning("File \"%s\" has incorrect size for raw image of size {%d,%d}", filename.cStr(),
		           size.x, size.y);
	}

	auto image = mksp<PaletteImage>(size);

	PaletteImageLock l(image, ImageLockUse::Write);

	for (int y = 0; y < size.y; y++)
	{
		for (int x = 0; x < size.x; x++)
		{
			// TODO: can read a stride at a time? Or just the whole chunk as it's tightly packed?
			uint8_t idx;
			if (!infile.read(reinterpret_cast<char *>(&idx), 1))
			{
				LogError("Unexpected EOF in file \"%s\" at {%d,%d}", filename.cStr(), x, y);
				return nullptr;
			}
			l.set(Vec2<unsigned int>{x, y}, idx);
		}
	}

	return image;
}
开发者ID:ShadowDancer,项目名称:OpenApoc,代码行数:41,代码来源:rawimage.cpp


示例14: getUicc

/* Gets identifier of the UICC */
uint32_t getUicc()
{
	if (uiccId == UNDEFINED)
	{
		getSecureElementList();
		if (uiccId == UNDEFINED)
		{
			LogWarning("UICC can't be detected");
		}
	}
	return uiccId;
}
开发者ID:4Fwolf,项目名称:mt6572_x201,代码行数:13,代码来源:com_android_nfc_NativeNfcSecureElement.cpp


示例15: TYPE_OPERATION

bonobo::DataType bonobo::Type(types::DataType dt)
{
#	define TYPE_OPERATION(C_TYPE, DATA_TYPE, SIZE, GL_DATA_TYPE) \
		case DATA_TYPE: return (bonobo::DataType) GL_DATA_TYPE;
	switch (dt) {
#		include "Types.inl"
		default: break;
	}
	LogWarning("GL type conversion failed");
	return bonobo::TYPE_INT;
#	undef TYPE_OPERATION
}
开发者ID:ragadeeshu,项目名称:planetoid,代码行数:12,代码来源:GLBdecl.cpp


示例16: LogWarning

bool Font::AddSymbol(unsigned char symbol, std::shared_ptr<FontSymbol> fontChar)
{
    FontSymbols::iterator it = this->symbols.find(symbol);
    if (it != this->symbols.end())
    {
        LogWarning("Duplicate symbol '%c'.", symbol);
        return false;
    }

    std::pair<FontSymbols::iterator, bool> status = this->symbols.insert(std::make_pair(symbol, fontChar));
    return status.second;
}
开发者ID:Asido,项目名称:Tamagotchi,代码行数:12,代码来源:Font.cpp


示例17: LogWarning

QVariant ConfigAPI::Read(const ConfigData &data, QString key, const QVariant &defaultValue) const
{
    if (data.file.isEmpty() || data.section.isEmpty())
    {
        LogWarning("ConfigAPI::Read: ConfigData does not have enough information (file and section).");
        return data.defaultValue;
    }
    if (defaultValue.isNull())
        return Read(data.file, data.section, key, data.defaultValue);
    else
        return Read(data.file, data.section, key, defaultValue);
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:12,代码来源:ConfigAPI.cpp


示例18: EmitAttributeChanged

void EC_DynamicComponent::AddQVariantAttribute(const QString &name, AttributeChange::Type change)
{
    //Check if the attribute has already been created.
    if(!ContainsAttribute(name))
    {
        Attribute<QVariant> *attribute = new Attribute<QVariant>(this, name.toStdString().c_str());
        EmitAttributeChanged(attribute, change);
        emit AttributeAdded(attribute);
    }
    else
        LogWarning("Failed to add a new QVariant in name of " + name.toStdString() + ", cause there already is an attribute in that name.");
}
开发者ID:A-K,项目名称:naali,代码行数:12,代码来源:EC_DynamicComponent.cpp


示例19: VOBJECT_GET_EMB

    int CWorldDbmgr::InsertDB(T_VECTOR_OBJECT* p, CDbOper& db)
    {
        if(p->size() != 3)
        {
            return -1;
        }

        CEntityMailbox& emb = VOBJECT_GET_EMB((*p)[0]);
        int32_t ref = VOBJECT_GET_I32((*p)[1]);
        SEntityPropFromPluto* p2 = (SEntityPropFromPluto*)((*p)[2]->vv.p);

        const string& strEntityName = GetDefParser().GetTypeName(p2->etype);

        //string strSql;
        //db.make_insert_sql(strEntityName, p2->data, strSql);
        //cout << strSql << endl;

        //string strSql2;
        //db.make_create_sql(strEntityName, strSql2);
        //cout << strSql2 << endl;

        //LogWarning("insert to db", "emb ref strEntityName = %s", strEntityName.c_str());

        string strErr;
        TDBID newid = db.InsertEntity(strEntityName, p2->data, strErr);
        if(newid == 0)
        {
            LogWarning("InsertDB_err", "newid=0;err=%s", strErr.c_str());
            //cout << strErr << endl;
            //return -2;
        }

        //通知db结果
        CEpollServer* s = this->GetServer();
        CMailBox* mb = s->GetServerMailbox(emb.m_nServerMailboxId);
        if(mb)
        {
#ifdef _WIN32
            mb->RpcCall(GetRpcUtil(), MSGID_BASEAPP_INSERT_ENTITY_CALLBACK, emb, newid, ref, strErr.c_str());
#else
            CRpcUtil& rpc = GetRpcUtil();
            CPluto* u = new CPluto;
            rpc.Encode(*u, MSGID_BASEAPP_INSERT_ENTITY_CALLBACK, emb, newid, ref, strErr.c_str());
            u->SetMailbox(mb);

            LogDebug("CDbOper::InsertDB", "u.GenLen()=%d", u->GetLen());

            g_pluto_sendlist.PushPluto(u);
#endif
        }

        return 0;
    }
开发者ID:1suming,项目名称:bigworld_ahzs,代码行数:53,代码来源:world_dbmgr.cpp


示例20: LogWarning

void Lab::update(unsigned int ticks, StateRef<Lab> lab, sp<GameState> state)
{
	if (lab->current_project && lab->getTotalSkill() > 0)
	{
		// A little complication as we want to be correctly calculating progress in an integer when
		// working with sub-single progress 'unit' time units.
		// This also leaves any remaining ticks in the lab's ticks_since_last_progress, so they will
		// get added onto the next project that lab undertakes at the first update.
		unsigned ticks_per_progress_point = TICKS_PER_HOUR / lab->getTotalSkill();
		unsigned ticks_remaining_to_progress = ticks + lab->ticks_since_last_progress;

		unsigned progress_points =
		    std::min(ticks_remaining_to_progress / ticks_per_progress_point,
		             lab->current_project->man_hours - lab->current_project->man_hours_progress);
		unsigned ticks_left =
		    ticks_remaining_to_progress - progress_points * ticks_per_progress_point;

		lab->ticks_since_last_progress = ticks_left;

		lab->current_project->man_hours_progress += progress_points;
		if (lab->current_project->isComplete())
		{
			// FIXME: Show 'research complete' screen
			LogWarning("Completed research %s", lab->current_project->name.c_str());
			sp<Facility> lab_facility;

			for (auto &base : state->player_bases)
			{
				for (auto &facility : base.second->facilities)
				{
					if (facility->lab == lab)
					{
						lab_facility = facility;
						break;
					}
				}
				if (lab_facility)
					break;
			}
			if (!lab_facility)
			{
				LogError("No facility owns the current lab");
			}

			auto complete_data = mksp<ResearchCompleteData>();
			complete_data->topic = lab->current_project;
			complete_data->lab = lab;
			auto event = new UserEvent("RESEARCH_COMPLETE", complete_data);
			fw().PushEvent(event);
			Lab::setResearch(lab, {state.get(), ""});
		}
	}
}
开发者ID:idshibanov,项目名称:OpenApoc,代码行数:53,代码来源:research.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Log_DebugPrintf函数代码示例发布时间:2022-05-30
下一篇:
C++ LogWarn函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap