Skip to content

Commit

Permalink
[deprecated] removed log priority
Browse files Browse the repository at this point in the history
  • Loading branch information
MrsRina committed Aug 30, 2023
1 parent 2dbe70e commit fe53ee6
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions include/ekg/util/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ namespace ekg {
protected:
std::ostringstream buffer {};
public:
static constexpr int32_t WARNING {0};
static constexpr int32_t INFO {1};
static constexpr int32_t ERROR {2};
static std::string cache;

static bool buffering() {
Expand All @@ -44,28 +41,8 @@ namespace ekg {
ekg::log::cache.clear();
}

explicit log(int32_t priority = ekg::log::INFO) {
switch (priority) {
case ekg::log::WARNING: {
this->buffer << "- [EKG-WARNING] ";
break;
}

case ekg::log::INFO: {
this->buffer << "[EKG-INFO] ";
break;
}

case ekg::log::ERROR: {
this->buffer << "[EKG-ERROR] ";
break;
}

default: {
break;
}
}

explicit log() {
this->buffer << "[EKG-INFO] ";
if (ekg::log::cache.size() >= 50000) ekg::log::cache.clear();
}

Expand Down

0 comments on commit fe53ee6

Please sign in to comment.