本文整理汇总了C++中LogWarning函数的典型用法代码示例。如果您正苦于以下问题:C++ LogWarning函数的具体用法?C++ LogWarning怎么用?C++ LogWarning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LogWarning函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()));
}
}
示例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!");
}
示例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);
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
}
示例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"));
}
示例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;
}
示例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;
}
示例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
}