Writes a given message to the log.
- Parameters
-
type | type of the log message (debug,info warning, error) |
format | format string as in printf() |
<return>E_SUCCESS, if log messages was successful written</return> <return>E_UNKNOWN, in case of some error</return>
References closeLog(), E_SUCCESS, E_UNKNOWN, filesize64(), isGreater64(), isZero64(), S_LOGENCCIPHER::iv, S_LOGENCCIPHER::iv_off, CAMutex::lock(), LOG_ENCRYPTED, m_hFileEncrypted, m_hFileInfo, m_logLevel, m_maxLogFileSize, m_NrOfWrites, m_pCipher, m_pcsPrint, m_strMsgBuff, m_strMsgTypes, m_uLogType, MAX_MSG_SIZE, MSG_COMPRESSED_FILE, MSG_FILE, MSG_LOG, MSG_NOLOG, MSG_STDOUT, myfilewrite, S_LOGENCCIPHER::oKey, openLog(), pMsg, STRMSGTYPES_SIZE, type, and CAMutex::unlock().
Referenced by CAAccountingDBInterface::__checkCountAllQuery(), CAAccountingDBInterface::__clearAccountStatus(), CAAccountingInstance::__commitSettlementToDatabase(), CAAccountingDBInterface::__deleteCC(), CAAccountingDBInterface::__getAccountStatus(), CAAccountingDBInterface::__getCostConfirmation(), CAAccountingDBInterface::__getPrepaidAmount(), CAAccountingDBInterface::__getUnsettledCostConfirmations(), CAAccountingInstance::__handleSettleResult(), CAAccountingInstance::__newSettlementTransaction(), CAAccountingDBInterface::__storeAccountStatus(), CAAccountingDBInterface::__storeCostConfirmation(), CAAccountingDBInterface::__storePrepaidAmount(), CASocket::accept(), CAFirstMixA::accountTrafficDownstream(), CAFirstMixA::accountTrafficUpstream(), CASocketGroupEpoll::add(), CAQueue::add(), CAFirstMixChannelList::addChannel(), CACmdLnOptions::addMixIdToMixInfo(), CAThreadPool::addRequest(), TermsAndConditions::addTranslation(), CACmdLnOptions::appendMixInfo_internal(), CACryptoBenchmark::benchmarkThread(), CAAccountingControlChannel::CAAccountingControlChannel(), CAAccountingInstance::CAAccountingInstance(), CAAccountingSettleThread::CAAccountingSettleThread(), CAReplayControlChannel::CAReplayControlChannel(), CAReplayCtrlChannelMsgProc::CAReplayCtrlChannelMsgProc(), CAAccountingInstance::cascadeMatchesCC(), CAMix::checkCompatibility(), CAAccountingDBInterface::checkConnectionStatus(), checkSizesOfTypes(), CAFirstMixA::checkUserConnections(), CAFirstMix::clean(), CALastMix::clean(), CAMiddleMix::clean(), CAAccountingDBInterface::cleanup(), CALibProxytest::cleanup(), cleanup(), CAAccountingInstance::cleanupTableEntry(), CATempIPBlockList::cleanupThreadMainLoop(), CASocket::close(), CAFirstMixA::closeConnection(), CASocket::connect(), CAFirstMix::connectToNextMix(), CAMiddleMix::connectToNextMix(), CASocket::create(), CASymChannelCipherFactory::createCipher(), CACmdLnOptions::createSockets(), CACryptoBenchmark::doBenchmark(), CATLSClientSocket::doTLSConnect(), CAFirstMix::doUserLogin_internal(), CAAccountingInstance::finishLoginProcess(), CAFirstMixA::finishPacket(), CAAccountingDBInterface::getConnection(), CACmdLnOptions::getMixXml(), CAAccountingInstance::getNrOfUsers(), CAInfoService::getPaymentInstance(), CAAccountingInstance::getPrepaidBytes(), CACertificate::getRawSubjectKeyIdentifier(), CACertificate::getSubjectKeyIdentifier(), CASignature::getVerifyKey(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CAAccountingInstance::handleCostConfirmation_internal(), CAAccountingInstance::handleJapPacket_internal(), CAFirstMix::handleTermsAndConditionsExtension(), CAFirstMix::handleTermsAndConditionsLogin(), CAInfoService::InfoLoop(), CAAccountingDBInterface::init(), CAFirstMix::init(), CALastMix::init(), CALocalProxy::init(), CAMiddleMix::init(), CAAccountingBIInterface::initBIConnection(), CAFirstMix::initCountryStats(), CAAccountingDBInterface::initDBConnection(), CACmdLnOptions::initLogging(), CAMix::initMixCascadeInfo(), CAFirstMix::initOnce(), CALastMix::initOnce(), CALocalProxy::initOnce(), CAMiddleMix::initOnce(), CAMix::initOnce(), CAIPList::insertIP(), integrateDOMNode(), CACmdLnOptions::invokeOptionSetters(), iplist_loopDoLogCountries(), isAllowedToPassRestrictions(), CACertificate::isValid(), CAThread::join(), CASocket::listen(), logMemoryUsage(), CALocalProxy::loop(), CAMiddleMix::loop(), CAFirstMixA::loop(), CALastMixA::loop(), CAFirstMixB::loop(), CALastMixB::loop(), main(), CAAccountingSettleThread::mainLoop(), CAAccountingInstance::makeInitialCCRequest(), CADatabase::measurePerformance(), CAReplayDatabase::measurePerformance(), CADatabase::nextClock(), CAReplayDatabase::nextClock(), CAFirstMixA::notifyAllUserChannels(), CACmdLnOptions::parse(), CAHttpClient::parseHTTPHeader(), CASocket::peek(), CAFirstMixChannelList::popTimeoutEntry_internal(), CAAccountingInstance::prepareCCRequest(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CASyncControlChannel::proccessMessage(), CASyncControlChannel::proccessMessageComplete(), CAChain::processDownstream(), CAAccountingInstance::processJapMessage(), CALastMix::processKeyExchange(), CAMiddleMix::processKeyExchange(), CALocalProxy::processKeyExchange(), CAAccountingInstance::processThread(), CACmdLnOptions::processXmlConfiguration(), CAAccountingControlChannel::processXMLMessage(), CAReplayControlChannel::processXMLMessage(), CAReplayCtrlChannelMsgProc::propagateCurrentReplayTimestamp(), CACmdLnOptions::readXmlConfiguration(), CAMuxSocket::receive(), CASocket::receive(), CATLSClientSocket::receive(), CAFirstMix::reconfigure(), CALastMix::reconfigure(), CALastMixB::reconfigureMix(), CAAccountingDBInterface::releaseConnection(), CAThreadList::removeAll(), CALastMixChannelList::removeChannel(), CACertificate::removeColons(), CAFirstMixChannelList::removeFromTimeoutList(), CAIPList::removeIP(), CAAccountingInstance::returnKickout(), CAAccountingInstance::returnPrepareKickout(), CASocketGroup::select(), CASocket::send(), CATLSClientSocket::send(), CAMuxSocket::send(), CAAccountingInstance::sendAILoginConfirmation(), CAInfoService::sendCascadeHelo(), CAAccountingInstance::sendCCRequest(), CASocket::sendFully(), CASocket::sendFullyTimeOut(), CAHttpClient::sendGetRequest(), CAAccountingInstance::sendInitialCCRequest(), CAControlChannelDispatcher::sendMessages(), CAInfoService::sendMixHelo(), CAHttpClient::sendPostRequest(), CAInfoService::sendStatus(), CASocket::sendTimeOut(), CAFirstMixA::sendToUsers(), CACmdLnOptions::setAccountingDatabase(), CAMuxSocket::setCipher(), CAFirstMixChannelList::setDelayParameters(), CACmdLnOptions::setDynamicMix(), CASocket::setKeepAlive(), CASymCipherOFB::setKeys(), CAFirstMixChannelList::setKickoutForced_internal(), CACmdLnOptions::setListenerInterfaces(), CACmdLnOptions::setLoggingOptions(), setLogOptions(), CACmdLnOptions::setMixCertificateVerification(), CACmdLnOptions::setNextMix(), CACmdLnOptions::setNextMixCertificate(), CACmdLnOptions::setNrOfFileDescriptors(), CACmdLnOptions::setOwnCertificate(), CACmdLnOptions::setPaymentInstance(), CAAccountingBIInterface::setPIServerConfiguration(), CACmdLnOptions::setPrepaidInterval(), CACmdLnOptions::setPrevMix(), CACmdLnOptions::setPriceCertificate(), CACmdLnOptions::setRessourceOptions(), CACmdLnOptions::setServerMonitoring(), CASignature::setSignKey(), CACmdLnOptions::setTargetInterfaces(), CALastMix::setTargets(), CACmdLnOptions::setTermsAndConditions(), CACmdLnOptions::setTermsAndConditionsList(), CACmdLnOptions::setTermsAndConditionsTemplates(), CAAccountingBIInterface::settle(), CAAccountingBIInterface::settleAll(), CAAccountingInstance::settlementTransaction(), CACmdLnOptions::setTrustedRootCertificates(), CACmdLnOptions::setUserID(), CAXMLErrorMessage::setValues(), CASignature::setVerifyKey(), CAThreadList::showAll(), CAFirstMixA::shutDown(), signal_interrupt(), signal_segv(), signal_term(), CAMultiSignature::signXML(), SIGUSR1_handler(), SIGUSR2_handler(), CAInfoService::start(), CALocalProxy::start(), CAMix::start(), CAThread::start(), CAAccountingBIInterface::terminateBIConnection(), CAFirstMix::updateCountryStats(), CACertificate::verify(), CACertStore::verifyMixCert(), CAMultiSignature::verifyXML(), CAThreadList::waitAndRemoveAll(), CAAccountingControlChannel::~CAAccountingControlChannel(), CAAccountingInstance::~CAAccountingInstance(), CAChain::~CAChain(), CAReplayCtrlChannelMsgProc::~CAReplayCtrlChannelMsgProc(), and CATempIPBlockList::~CATempIPBlockList().