nice logger api improvement
This commit is contained in:
		@@ -58,17 +58,25 @@ public:
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    template<typename T>
 | 
			
		||||
    line_logger& operator<<(const T& what)
 | 
			
		||||
	template<typename T>
 | 
			
		||||
    void write(const T& what)
 | 
			
		||||
    {
 | 
			
		||||
        if (_enabled)
 | 
			
		||||
		{
 | 
			
		||||
            _oss << what;
 | 
			
		||||
			_empty = false;
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    template<typename T>
 | 
			
		||||
    line_logger& operator<<(const T& what)
 | 
			
		||||
    {
 | 
			
		||||
        write(what);
 | 
			
		||||
        return *this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    logger* _callback_logger;
 | 
			
		||||
    log_msg _log_msg;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user