QDebug RollingFileAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); QString codec_name; if (encoding()) codec_name = QLatin1String(encoding()->name()); rDebug.nospace() << "RollingFileAppender(" << "name:" << name() << " " << "appendfile:" << appendFile() << " " << "bufferedio:" << bufferedIo() << " " << "encoding:" << codec_name << " " << "file:" << file() << " " << "filter:" << firstFilter() << " " << "immediateflush:" << immediateFlush() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "layout:" << layout_name << " " << "maxbackupindex:" << maxBackupIndex() << " " << "maximumfilesize:" << maximumFileSize() << " " << "referencecount:" << referenceCount() << " " << "threshold:" << threshold().toString() << " " << "writer:" << writer() << ")"; return rDebug.space(); }
QDebug DailyRollingFileAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); QString codec_name; if (encoding()) codec_name = QLatin1String(encoding()->name()); rDebug.nospace() << "DailyRollingFileAppender(" << "name:" << name() << " " << "activedatepattern:" << mActiveDatePattern << " " << "appendfile:" << appendFile() << " " << "bufferedio:" << bufferedIo() << " " << "datepattern:" << datePattern() << " " << "encoding:" << codec_name << " " << "frequency:" << frequencyToString() << " " << "file:" << fileName() << " " << "filepath:" << filePath() << " " << "suffix:" << suffix() << " " << "fullFileName:" << fullFileName() << " " << "filter:" << firstFilter() << " " << "immediateflush:" << immediateFlush() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "layout:" << layout_name << " " << "referencecount:" << referenceCount() << " " << "rollovertime:" << mRollOverTime << "threshold:" << threshold().toString() << "writer:" << writer() << ")"; return rDebug.space(); }
QDebug SimpleLayout::debug(QDebug &rDebug) const { rDebug.nospace() << "SimpleLayout(" << "name:" << name() << " " << "referencecount:" << referenceCount() << ")"; return rDebug.space(); }
void BaseTagHDF5::references(const std::vector<DataArray> &refs_new) { while (referenceCount() > 0) { removeReference(getReference(0)->id()); } for (const auto &ref : refs_new) { addReference(ref.id()); } }
QDebug LevelRangeFilter::debug(QDebug &rDebug) const { rDebug.nospace() << "LevelRangeFilter(" << "acceptonmatch:" << mAcceptOnMatch << " " << "levelmin:" << mLevelMin.toString() << " " << "levelmax:" << mLevelMax.toString() << " " << "next:" << next() << "referencecount:" << referenceCount() << " " << ")"; return rDebug.space(); }
QDebug ListAppender::debug(QDebug &rDebug) const { rDebug.nospace() << "ListAppender(" << "name:" << name() << " " << "count:" << list().count() << " " << "filter:" << firstFilter() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "maxcount:" << maxCount() << " " << "referencecount:" << referenceCount() << " " << "threshold:" << threshold().toString() << ")"; return rDebug.space(); }
QDebug BinaryToTextLayout::debug(QDebug &rDebug) const { rDebug.nospace() << "BinaryToTextLayout(" << "name:" << name() << " "; if (mSubLayout) rDebug.nospace() << "sublayout: " << *mSubLayout << " "; else rDebug.nospace() << "sublayout: <null> "; rDebug.nospace() << "referencecount:" << referenceCount() << ")"; return rDebug.space(); }
QDebug SignalAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); rDebug.nospace() << "WriterAppender(" << "name:" << name() << " " << "filter:" << firstFilter() << "isactive:" << isActive() << "isclosed:" << isClosed() << "layout:" << layout_name << "referencecount:" << referenceCount() << " " << "threshold:" << threshold().toString() << ")"; return rDebug.space(); }
void AutoreleasePool::drain() { debugLog("Draining, will pop autoreleasepool " << parent); insertLock.lock(); // The first buffer (if exists) could be only partially filled if(pendingReleases) { for(int i = 0; i < currentBufferIndex; i++) { pendingReleases->buffer[i]->release(); } AutoreleaseStructure *toDelete = pendingReleases; pendingReleases = pendingReleases->parent; delete toDelete; } while(pendingReleases != nullptr) { // Each subsequent node must be filled to the brim for(int i = 0; i < NodeBufferSize; i++) { pendingReleases->buffer[i]->release(); } AutoreleaseStructure *toDelete = pendingReleases; pendingReleases = pendingReleases->parent; delete toDelete; } insertLock.unlock(); // thread local so thread safe _currentPool = parent; // If this autoreleasepool is on the heap, draining should delete it. if(referenceCount() != -1) { delete this; } }
QDebug ConsoleAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); QString target; if (mTarget == STDOUT_TARGET) target = QLatin1String("STDOUT"); else target = QLatin1String("STDERR"); rDebug.nospace() << "ConsoleAppender(" << "name:" << name() << " " << "filter:" << firstFilter() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "layout:" << layout_name << " " << "target:" << target << " " << "referencecount:" << referenceCount() << " " << "threshold:" << threshold().toString() << ")"; return rDebug.space(); }
void BaseTagHDF5::references(const std::vector<DataArray> &refs_new) { // extract vectors of names from vectors of new & old references std::vector<std::string> names_new(refs_new.size()); transform(refs_new.begin(), refs_new.end(), names_new.begin(), util::toName<DataArray>); //FIXME: issue 473 std::vector<DataArray> refs_old(static_cast<size_t>(referenceCount())); for (size_t i = 0; i < refs_old.size(); i++) refs_old[i] = getReference(i); std::vector<std::string> names_old(refs_old.size()); transform(refs_old.begin(), refs_old.end(), names_old.begin(), util::toName<DataArray>); // sort them std::sort(names_new.begin(), names_new.end()); std::sort(names_new.begin(), names_new.end()); // get names only in names_new (add), names only in names_old (remove) & ignore rest std::vector<std::string> names_add; std::vector<std::string> names_rem; std::set_difference(names_new.begin(), names_new.end(), names_old.begin(), names_old.end(), std::inserter(names_add, names_add.begin())); std::set_difference(names_old.begin(), names_old.end(), names_new.begin(), names_new.end(), std::inserter(names_rem, names_rem.begin())); // check if all new references exist & add sources auto blck = dynamic_pointer_cast<BlockHDF5>(block()); for (auto name : names_add) { if (!blck->hasDataArray(name)) throw std::runtime_error("One or more data arrays do not exist in this block!"); addReference(blck->getDataArray(name)->id()); } // remove references for (auto name : names_rem) { if (!blck->hasDataArray(name)) removeReference(blck->getDataArray(name)->id()); } }
std::vector<DataArray> MultiTag::references(const util::Filter<DataArray>::type &filter) const { auto f = [this] (size_t i) { return getReference(i); }; return getEntities<DataArray>(f, referenceCount(), filter); }