Minor edits, removing use namespace from headers

This commit is contained in:
Paul Sutton 2015-06-02 16:15:04 +01:00
parent d7f7827e82
commit 28c78fe6b2
2 changed files with 16 additions and 18 deletions

View File

@ -45,15 +45,13 @@
#define Info(fmt, ...) log_h->info(__FILE__, __LINE__, fmt, ##__VA_ARGS__) #define Info(fmt, ...) log_h->info(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
#define Debug(fmt, ...) log_h->debug(__FILE__, __LINE__, fmt, ##__VA_ARGS__) #define Debug(fmt, ...) log_h->debug(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
using namespace std;
namespace srslte { namespace srslte {
class log class log
{ {
public: public:
log(string service_name_) { service_name = service_name_; tti = 0; level = LOG_LEVEL_NONE; } log(std::string service_name_) { service_name = service_name_; tti = 0; level = LOG_LEVEL_NONE; }
// This function shall be called at the start of every tti for printing tti // This function shall be called at the start of every tti for printing tti
void step(uint32_t tti_) { void step(uint32_t tti_) {
@ -74,23 +72,23 @@ public:
} }
// Pure virtual methods for logging // Pure virtual methods for logging
virtual void error(string message, ...) = 0; virtual void error(std::string message, ...) = 0;
virtual void warning(string message, ...) = 0; virtual void warning(std::string message, ...) = 0;
virtual void info(string message, ...) = 0; virtual void info(std::string message, ...) = 0;
virtual void debug(string message, ...) = 0; virtual void debug(std::string message, ...) = 0;
// Same with line and file info // Same with line and file info
virtual void error(string file, int line, string message, ...) = 0; virtual void error(std::string file, int line, std::string message, ...) = 0;
virtual void warning(string file, int line, string message, ...) = 0; virtual void warning(std::string file, int line, std::string message, ...) = 0;
virtual void info(string file, int line, string message, ...) = 0; virtual void info(std::string file, int line, std::string message, ...) = 0;
virtual void debug(string file, int line, string message, ...) = 0; virtual void debug(std::string file, int line, std::string message, ...) = 0;
protected: protected:
string get_service_name() { return service_name; } std::string get_service_name() { return service_name; }
uint32_t tti; uint32_t tti;
log_level_t level; log_level_t level;
private: private:
string service_name; std::string service_name;
}; };
} }