mirror of https://gitee.com/bigwinds/arangodb
Revert "another attempt to fix logger issues"
This reverts commit c6c9120e33
.
This commit is contained in:
parent
79f6a39c23
commit
c7acebe3c0
|
@ -41,7 +41,6 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
using namespace arangodb;
|
using namespace arangodb;
|
||||||
using namespace arangodb::basics;
|
|
||||||
|
|
||||||
Index::Index(
|
Index::Index(
|
||||||
TRI_idx_iid_t iid, arangodb::LogicalCollection* collection,
|
TRI_idx_iid_t iid, arangodb::LogicalCollection* collection,
|
||||||
|
|
|
@ -205,3 +205,63 @@ bool arangodb::basics::TRI_AttributeNamesHaveExpansion(
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief append the attribute name to an output stream
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream& stream,
|
||||||
|
arangodb::basics::AttributeName const* name) {
|
||||||
|
stream << name->name;
|
||||||
|
if (name->shouldExpand) {
|
||||||
|
stream << "[*]";
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief append the attribute name to an output stream
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream& stream,
|
||||||
|
arangodb::basics::AttributeName const& name) {
|
||||||
|
stream << name.name;
|
||||||
|
if (name.shouldExpand) {
|
||||||
|
stream << "[*]";
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief append the attribute names to an output stream
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::ostream& operator<<(
|
||||||
|
std::ostream& stream,
|
||||||
|
std::vector<arangodb::basics::AttributeName> const* attributes) {
|
||||||
|
size_t const n = attributes->size();
|
||||||
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
if (i > 0) {
|
||||||
|
stream << ".";
|
||||||
|
}
|
||||||
|
stream << attributes[i];
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief append the attribute names to an output stream
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::ostream& operator<<(
|
||||||
|
std::ostream& stream,
|
||||||
|
std::vector<arangodb::basics::AttributeName> const& attributes) {
|
||||||
|
size_t const n = attributes.size();
|
||||||
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
if (i > 0) {
|
||||||
|
stream << ".";
|
||||||
|
}
|
||||||
|
stream << attributes[i];
|
||||||
|
}
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
|
@ -85,18 +85,6 @@ struct AttributeName {
|
||||||
|
|
||||||
static bool namesMatch(std::vector<AttributeName> const&,
|
static bool namesMatch(std::vector<AttributeName> const&,
|
||||||
std::vector<AttributeName> const&);
|
std::vector<AttributeName> const&);
|
||||||
|
|
||||||
friend std::ostream& operator<<(std::ostream& stream, arangodb::basics::AttributeName const* name) {
|
|
||||||
stream << name->name;
|
|
||||||
if (name->shouldExpand) {
|
|
||||||
stream << "[*]";
|
|
||||||
}
|
|
||||||
return stream;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend std::ostream& operator<<(std::ostream& stream, arangodb::basics::AttributeName const& name) {
|
|
||||||
return operator<<(stream, &name);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -138,20 +126,14 @@ void TRI_AttributeNamesJoinNested(std::vector<AttributeName> const& input,
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool TRI_AttributeNamesHaveExpansion(std::vector<AttributeName> const& input);
|
bool TRI_AttributeNamesHaveExpansion(std::vector<AttributeName> const& input);
|
||||||
|
}
|
||||||
static inline std::ostream& operator<<(std::ostream& stream,
|
|
||||||
std::vector<AttributeName> const& attributes) {
|
|
||||||
size_t const n = attributes.size();
|
|
||||||
for (size_t i = 0; i < n; ++i) {
|
|
||||||
if (i > 0) {
|
|
||||||
stream << ".";
|
|
||||||
}
|
|
||||||
stream << attributes[i];
|
|
||||||
}
|
|
||||||
return stream;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const*);
|
||||||
}
|
std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const&);
|
||||||
|
std::ostream& operator<<(std::ostream&,
|
||||||
|
std::vector<arangodb::basics::AttributeName> const*);
|
||||||
|
std::ostream& operator<<(std::ostream&,
|
||||||
|
std::vector<arangodb::basics::AttributeName> const&);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,13 +78,7 @@ class LoggerStream {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
friend LoggerStream& operator<<(LoggerStream& out, T const& obj) {
|
friend LoggerStream& operator<<(LoggerStream& out, T const& obj) {
|
||||||
out._out << obj;
|
out << obj;
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
friend LoggerStream& operator<<(LoggerStream& out, T&& obj) {
|
|
||||||
out._out << obj;
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue