aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Flowgraph.cpp10
-rw-r--r--src/Flowgraph.h6
-rw-r--r--src/Log.cpp12
3 files changed, 18 insertions, 10 deletions
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp
index c14280e..e594d70 100644
--- a/src/Flowgraph.cpp
+++ b/src/Flowgraph.cpp
@@ -198,6 +198,16 @@ int Node::process()
return ret;
}
+time_t Node::processTime() const
+{
+ return myProcessTime;
+}
+
+void Node::addProcessTime(time_t time)
+{
+ myProcessTime += time;
+}
+
Edge::Edge(shared_ptr<Node>& srcNode, shared_ptr<Node>& dstNode) :
mySrcNode(srcNode),
myDstNode(dstNode)
diff --git a/src/Flowgraph.h b/src/Flowgraph.h
index 08ead14..43550d0 100644
--- a/src/Flowgraph.h
+++ b/src/Flowgraph.h
@@ -51,10 +51,8 @@ public:
std::shared_ptr<ModPlugin> plugin() { return myPlugin; }
int process();
- time_t processTime() { return myProcessTime; }
- void addProcessTime(time_t processTime) {
- myProcessTime += processTime;
- }
+ time_t processTime() const;
+ void addProcessTime(time_t time);
void addOutputBuffer(Buffer::sptr& buffer, Metadata_vec_sptr& md);
void removeOutputBuffer(Buffer::sptr& buffer, Metadata_vec_sptr& md);
diff --git a/src/Log.cpp b/src/Log.cpp
index 15c02d0..3c5b181 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -47,7 +47,7 @@ void Logger::register_backend(std::shared_ptr<LogBackend> backend)
}
-void Logger::log(log_level_t level, const char* fmt, ...)
+void Logger::log(log_level_t lvl, const char* fmt, ...)
{
int size = 100;
std::string str;
@@ -67,12 +67,12 @@ void Logger::log(log_level_t level, const char* fmt, ...)
size *= 2;
}
- logstr(level, move(str));
+ logstr(lvl, move(str));
}
-void Logger::logstr(log_level_t level, std::string&& message)
+void Logger::logstr(log_level_t lvl, std::string&& message)
{
- log_message_t m(level, move(message));
+ log_message_t m(lvl, move(message));
m_message_queue.push(move(m));
}
@@ -108,9 +108,9 @@ void Logger::io_process()
}
}
-LogLine Logger::level(log_level_t level)
+LogLine Logger::level(log_level_t lvl)
{
- return LogLine(this, level);
+ return LogLine(this, lvl);
}
LogToFile::LogToFile(const std::string& filename) : name("FILE")