wip static lib
This commit is contained in:
		
							parent
							
								
									c69c49047b
								
							
						
					
					
						commit
						4dd1a24d0b
					
				@ -14,6 +14,9 @@ spdlog::logger *get_logger();
 | 
			
		||||
 | 
			
		||||
int main(int, char *[])
 | 
			
		||||
{    
 | 
			
		||||
    auto *l = get_logger();
 | 
			
		||||
    l->info("HEllo {}", "HG FS");
 | 
			
		||||
	int x = 4;
 | 
			
		||||
	spdlog::info("HELLO {}", "st at ic");
 | 
			
		||||
    spdlog::warn("HELLO {}*{} = {}", x, x, x*x);
 | 
			
		||||
    /*auto *l = get_logger();
 | 
			
		||||
    l->info("HEllo {}", "HG FS");*/
 | 
			
		||||
}
 | 
			
		||||
@ -34,18 +34,15 @@ public:
 | 
			
		||||
 | 
			
		||||
    void register_logger(std::shared_ptr<logger> new_logger);    
 | 
			
		||||
    void initialize_logger(std::shared_ptr<logger> new_logger);    
 | 
			
		||||
    std::shared_ptr<logger> get(const std::string &logger_name);
 | 
			
		||||
    
 | 
			
		||||
    std::shared_ptr<logger> get(const std::string &logger_name);   
 | 
			
		||||
    std::shared_ptr<logger> default_logger();
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    // Return raw ptr to the default logger.
 | 
			
		||||
    // To be used directly by the spdlog default api (e.g. spdlog::info)
 | 
			
		||||
    // This make the default API faster, but cannot be used concurrently with set_default_logger().
 | 
			
		||||
    // e.g do not call set_default_logger() from one thread while calling spdlog::info() from another.
 | 
			
		||||
    logger *get_default_raw();
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    // set default logger.
 | 
			
		||||
    // default logger is stored in default_logger_ (for faster retrieval) and in the loggers_ map.
 | 
			
		||||
    void set_default_logger(std::shared_ptr<logger> new_default_logger);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user