本文整理汇总了C++中LOG_1函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_1函数的具体用法?C++ LOG_1怎么用?C++ LOG_1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_1函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: srcp
bool Path::copy( const QString & src, const QString & dest )
{
Path srcp( src ), destp( dest );
if( !srcp.fileExists() || !destp.dir().dirExists() )
return false;
#ifdef Q_OS_WIN
bool s_unc = false, d_unc = false;
QString srcw( srcp.path() );
srcw = srcw.replace( "/", "\\" );
QString destw( destp.path() );
destw = destw.replace( "/", "\\" );
if( srcw[0] == '\\' && srcw[1] == '\\' ) s_unc = true;
if( destw[0] == '\\' && destw[1] == '\\' ) d_unc = true;
srcw.replace( "\\\\", "\\" );
if( s_unc ) srcw = "\\" + srcw;
destw.replace( "\\\\", "\\" );
if( d_unc ) destw = "\\" + destw;
bool ret = CopyFileA( srcw.toLatin1(), destw.toLatin1(), false ) != 0;
if( !ret ) {
DWORD err = GetLastError();
LOG_1( "Copy failed with error: " + QString::number(err) );
LOG_1( "Src: " + srcw + "Dest: " + destw );
}
return ret;
#else
system( QString( "cp " + srcp.path() + " " + destp.path() ).toLatin1() );
return true;
#endif
}
示例2: LOG_1
// ---------------------------------------------------------------------------
// CLingerConnection::StartLinger
// ---------------------------------------------------------------------------
//
TInt CLingerConnection::StartLinger()
{
LOG_1( _L("CLingerConnection::StartLinger") );
if ( !iAttached )
{
// Read settings
ReadSettings();
if ( iLingerInterval != 0 )
{
TInt err = OpenAndAttach();
if ( err != KErrNone )
{
// Write to log
LOG_2( _L("OpenAndAttach: err: %d"), err );
return( err );
}
if ( iLingerInterval > 0 )
{
// Start timer
StartTimer( KDataInactivityInterval );
LOG_1( _L("Linger timer started OK") );
}
}
}
return KErrNone;
}
示例3: LOG_1
// ---------------------------------------------------------------------------
// CVpnSipObserver::RunL
// ---------------------------------------------------------------------------
//
void CVpnSipObserver::RunL()
{
LOG_1( "CVpnSipObserver::RunL iStatus = %d", iStatus.Int());
if ( iStatus == KErrNone )
{
TInt val = 0;
// SIP Profile Server notified completion of SIP deregistration.
TInt err = iSIPProperty.Get( KPSVpnSipUid, KVpnSipState, val );
if ( err == KErrNone && val == ESipDeregisterCompleted )
{
// If SIP is deregistered, let the VPN Connection Agent to
// proceed VPN session start.
LOG_( "CVpnSipObserver::RunL SIP is deregistered. VPN Connection Agent continue with VPN start." );
iAgent.ProceedServiceStart();
}
else
{
// Keep monitoring.
Subscribe();
}
}
// Check if observer can be restarted.
else if ( iStatus != KErrCancel
&& iStatus != KErrServerTerminated
&& iStatus != KErrNotSupported )
{
// Keep monitoring.
Subscribe();
}
else
{
// Error.
LOG_1( "CVpnSipObserver::RunL Unknown error situation, iStatus = %d", iStatus.Int() );
}
}
示例4: LOG_1
// -----------------------------------------------------------------------------
// CSilenceAction::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CSilenceAction::ConstructL( )
{
LOG_1( _L("->CSilenceAction::ConstructL: START") );
iPhoneClient = CPhCltCommandHandler::NewL();
LOG_1( _L("<-CSilenceAction::ConstructL: END") );
}
示例5: QObject
JobBurner::JobBurner( const JobAssignment & jobAssignment, Slave * slave, int options )
: QObject( slave )
, mSlave( slave )
, mCmd( 0 )
, mJobAssignment( jobAssignment )
, mJob( jobAssignment.job() )
, mLoaded( false )
, mOutputTimer( 0 )
, mMemTimer( 0 )
, mLogFlushTimer( 0 )
, mCheckupTimer( 0 )
, mState( StateNew )
, mOptions( Options(options) )
, mCurrentCopy( 0 )
, mLogFilesReady( false )
, mLogFile( 0 )
, mLogStream( 0 )
, mCmdPid( 0 )
{
mOutputTimer = new QTimer( this );
connect( mOutputTimer, SIGNAL( timeout() ), SLOT( updateOutput() ) );
mMemTimer = new QTimer( this );
connect( mMemTimer, SIGNAL( timeout() ), SLOT( checkMemory() ) );
mCheckupTimer = new QTimer( this );
connect( mCheckupTimer, SIGNAL( timeout() ), SLOT( checkup() ) );
mCheckupTimer->start(30000);
/* Ensure we are actually assigned some tasks to work on */
mTaskAssignments = mJobAssignment.jobTaskAssignments();
if( mTaskAssignments.isEmpty() ) {
jobErrored( QString("JobAssignment has no assigned tasks, Job Assignment key: %1").arg(mJobAssignment.key()) );
return;
}
// Double check that we are still assigned
mJobAssignment.reload();
if( mJobAssignment.jobAssignmentStatus().status() != "ready" ) {
LOG_1( "JobAssignment no longer ready, cancelling the burn" );
cancel();
return;
}
/* Make sure each of the tasks are still valid, some could have already been unassigned or cancelled */
/* Also verify that the jobtask record matches the assignment */
mTasks = JobTask::table()->records( mTaskAssignments.keys( JobTaskAssignment::schema()->field("fkeyjobtask")->pos() ), /*select=*/true, /*useCache=*/false );
foreach( JobTaskAssignment jta, mTaskAssignments ) {
JobTask task = jta.jobTask();
if( jta.jobAssignmentStatus().status() != "ready" || task.status() != "assigned" || task.host() != Host::currentHost() ) {
LOG_1( QString("JobTask no longer assigned, discarding. keyJobTask: %1 keyJobTaskAssignment: %2 jobtask status: %3 jobtaskassignment status: %4")
.arg(task.key()).arg(jta.key()).arg(task.status()).arg(jta.jobAssignmentStatus().status()) );
mTaskAssignments -= jta;
mTasks -= task;
}
}
示例6: LOG_
void CPKCS12Handler::SaveCertificatesToDiskL()
{
LOG_("-> CPKCS12Handler::SaveCertificatesToDiskL()");
TInt certCount(0);
// first the CAs (if any; not required necessarily)
if (iCACerts)
{
certCount = iCACerts->Count();
LOG_1(" Saving %d CA Certificates", certCount);
for (TInt i = 0; i < certCount; i++)
{
CX509Certificate* cert = iCACerts->At(i);
// Generate filename with running identifier
// Use TFileName, because the function isn't stack
// critical
TFileName fn;
fn.Format(KCAFileNameStem(), i+1);
WriteToFileL(cert->Encoding(), fn);
}
}
LOG(else LOG_(" No CA Certs found!"));
// Then the user certs
if (iUserCerts)
{
certCount = iUserCerts->Count();
LOG_1(" Saving %d User Certificates", certCount);
for (TInt i = 0; i < certCount; i++)
{
CX509Certificate* cert = iUserCerts->At(i);
TFileName fn;
fn.Format(KUserCertFileNameStem(), i+1);
WriteToFileL(cert->Encoding(), fn);
}
}
LOG(else LOG_(" No User Certs found!"));
LOG_("<- CPKCS12Handler::SaveCertificatesToDiskL()");
}
示例7: LOG_1
// ---------------------------------------------------------------------------
// CAORAUManagerImpl::RAUEventSubscribeIssueRequest
// ---------------------------------------------------------------------------
//
void CAORAUManagerImpl::RAUEventSubscribeIssueRequest(
TRequestStatus& aStatus )
{
LOG_1( _L("CAORAUManagerImpl::RAUEventSubscribeIssueRequest") );
iRAUEventProperty.Subscribe( aStatus );
}
示例8: LOG_1
// ---------------------------------------------------------------------------
// CAOTimer::StartRetryTimer
// ---------------------------------------------------------------------------
//
void CAOTimer::StartRetryTimer()
{
LOG_1( _L("CAOTimer::StartRetryTimer") );
__ASSERT_DEBUG( !iRetryTimer->IsActive(),
Panic( ERetryTimerAlreadyActive ) );
iRetryTimerCount = 0;
// First check if the current retry timer value is more than 30 minutes
iCurrentRetryTimerInterval = 0;
if( iSettings.RetryTimerValue() > KMaxTimerInSeconds )
{
// First interval is 30 minutes
iCurrentRetryTimerInterval = KMaxTimerInSeconds * KSecondsToMicro;
}
else
{
// use current value
iCurrentRetryTimerInterval =
iSettings.RetryTimerValue() * KSecondsToMicro;
}
TCallBack cb( RetryTimerCallBack, this );
iRetryTimer->Start(
iCurrentRetryTimerInterval, iCurrentRetryTimerInterval, cb );
}
示例9: LOG_1
// --------------------------------------------------------------------------
// TAOState::HandleResetFactorySettingsL
// --------------------------------------------------------------------------
//
TAOState* TAOState::HandleResetFactorySettingsL( TBool aReset )
{
LOG_1( _L("TAOState::HandleResetFactorySettingsL") );
TAOState* newState = NULL;
if ( aReset )
{
// Close connection
CancelAll();
// Respond to Rfs that connection has been torn down and rfs sequence
// can continue
RProperty::Set(
KPDPContextManager2,
KPDPContextManagerFactorySettingsReset,
EPDPContextManagerFactorySettingsResetStartReply );
newState = iStatePool.ChangeState( EStateResetFactorySettings );
}
else
{
newState = DoActivatePDPContextL();
}
return newState;
}
示例10: LOG_1
// ---------------------------------------------------------------------------
// CAOGpds::ConstructL
// ---------------------------------------------------------------------------
//
void CAOGpds::ConstructL()
{
LOG_1( _L("CAOGpds::ConstructL") );
// Create active schduler wiat for synchronizing async operations
iWait = new( ELeave ) CActiveSchedulerWait;
}
示例11: exploreFile
void exploreFile( QString path )
{
QFileInfo fi(path);
QStringList args;
QString dirPath = QFileInfo( path ).path();
QString cmd;
#ifdef Q_OS_WIN
cmd = "explorer.exe";
if( fi.isFile() && fi.exists() ) {
args << "/select,";
args << path.replace("/","\\");
} else
args << dirPath.replace("/", "\\");
#endif
#ifdef Q_OS_LINUX
args << dirPath.replace('\\', '/');
cmd = "thunar";
#endif
#ifdef Q_OS_MAC
args << dirPath.replace('\\', '/');
cmd = "open";
#endif
if( !QProcess::startDetached( cmd, args ) ) {
LOG_1( "Unable to start " + cmd );
}
}
示例12: LOG_1
// ---------------------------------------------------------------------------
// CAOSettings::LingerTimerValue
// ---------------------------------------------------------------------------
//
TInt CAOSettings::LingerTimerValue( const TUint aIapId ) const
{
LOG_1( _L("CAOSettings::LingerTimerValue") );
for ( TInt j=0; j < iLingerSettings.Count(); j++ )
{
if ( iLingerSettings[ j ].iIap == aIapId )
{
LOG_3( _L("Linger setting found >> iap: %d, interval: %d"),
aIapId,
iLingerSettings[ j ].iInterval);
if ( iLingerSettings[ j ].iInterval == 0 )
{
return KLingerForEver;
}
else
{
return ( iLingerSettings[ j ].iInterval );
}
}
}
LOG_2( _L("LingerTimerValue() not found >> iap: %d"),
aIapId );
return KLingerOff; // Linger is off
}
示例13: file
bool IniConfig::writeToFile( const QString & fileName )
{
QString filePath = fileName;
if( filePath.isEmpty() )
filePath = mFile;
QFile file(filePath);
if( !file.open(QIODevice::WriteOnly) ) {
LOG_1( "Unable to open config file for writing at: " + filePath );
return false;
}
QTextStream out(&file);
QMap<QString, QMap<QString,QString> >::Iterator it;
for(it = mValMap.begin(); it != mValMap.end(); ++it)
{
if( !it.value().isEmpty() ){
out << '[' << (it.key().isEmpty() ? QString("NO_SECTION") : it.key()) << ']' << '\n';
for( QMap<QString,QString>::Iterator valit = it.value().begin(); valit!=it.value().end(); ++valit )
out << valit.key() << '=' << valit.value() << '\n';
out << "\n";
}
}
LOG_3( "Wrote config file to: " + filePath );
return true;
}
示例14: write
void write( QString & input, QString output )
{
if( readFile( output ) != input ) {
if( !writeFullFile( output, input ) )
LOG_1( "Couldn't open " + output + " for writing" );
}
}
示例15: LOG_1
// ---------------------------------------------------------------------------
// CAOConnectionImpl::DoCancel
// ---------------------------------------------------------------------------
//
void CAOConnectionImpl::DoCancel()
{
LOG_1( _L("CAOConnectionImpl::DoCancel") );
ChangeState( EDisconnected );
CompleteSelf( iStatus, KErrCancel );
}