Updated readme and example.cpp
This commit is contained in:
		
							
								
								
									
										23
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								README.md
									
									
									
									
									
								
							@@ -13,19 +13,20 @@ Just copy the files to your build tree and use a C++11 compiler
 | 
				
			|||||||
* visual studio 2013
 | 
					* visual studio 2013
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##Features
 | 
					##Features
 | 
				
			||||||
* Very low overhead
 | 
					* Very fast - performance is the primary goal
 | 
				
			||||||
* Stream like, easy to use interface
 | 
					* Headers only
 | 
				
			||||||
* Logging levels
 | 
					* No dependencies
 | 
				
			||||||
 | 
					* Cross platform - Linux / Windows on 32/64 bits
 | 
				
			||||||
 | 
					* Mult/Single threaded loggers
 | 
				
			||||||
* Rotating log files
 | 
					* Rotating log files
 | 
				
			||||||
* Daily log files
 | 
					* Daily log files
 | 
				
			||||||
* Async logging
 | 
					* Console logging
 | 
				
			||||||
* Thread safety
 | 
					* Async logging* 
 | 
				
			||||||
* Custom formatting
 | 
					* Logging levels
 | 
				
			||||||
 | 
					* Custom formatting with user defined patterns
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Benchmarks
 | 
				
			||||||
## Performance
 | 
					Here are some benchmarks  (Ubuntu 64 bits, Intel i7-4770 CPU @ 3.40GHz)
 | 
				
			||||||
The library is very fast. 
 | 
					 | 
				
			||||||
Here are some benchmarks  (Ubuntu, Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz)
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
*******************************************************************************
 | 
					*******************************************************************************
 | 
				
			||||||
Single thread, 250,000 iterations, flush every 1000 lines
 | 
					Single thread, 250,000 iterations, flush every 1000 lines
 | 
				
			||||||
@@ -52,7 +53,7 @@ int main(int, char* [])
 | 
				
			|||||||
    try
 | 
					    try
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        std::string filename = "spdlog_example";
 | 
					        std::string filename = "spdlog_example";
 | 
				
			||||||
        auto console = spd::stderr_logger_mt("console");
 | 
					        auto console = spd::stdout_logger_mt("console");
 | 
				
			||||||
        console->info("Welcome to spdlog!") ;
 | 
					        console->info("Welcome to spdlog!") ;
 | 
				
			||||||
        console->info() << "Creating file " << filename << "..";
 | 
					        console->info() << "Creating file " << filename << "..";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,8 +44,8 @@ int main(int, char* [])
 | 
				
			|||||||
        //Create console, multithreaded logger
 | 
					        //Create console, multithreaded logger
 | 
				
			||||||
        auto console = spd::stdout_logger_mt("console");
 | 
					        auto console = spd::stdout_logger_mt("console");
 | 
				
			||||||
        console->info("Welcome to spdlog!") ;
 | 
					        console->info("Welcome to spdlog!") ;
 | 
				
			||||||
        console->info("Varriadic template call are supproted", "...", 1, 2, 3.5);
 | 
					        console->info("An info message example", "...", 1, 2, 3.5);
 | 
				
			||||||
        console->info() << "streams are supported too  " << std::setw(5) << std::setfill('0') << 1;
 | 
					        console->info() << "Streams are supported too  " << std::setw(5) << std::setfill('0') << 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Create a file rotating logger with 5mb size max and 3 rotated files
 | 
					        //Create a file rotating logger with 5mb size max and 3 rotated files
 | 
				
			||||||
        auto file_logger = spd::rotating_logger_mt("file_logger", filename, 1024 * 1024 * 5, 3);
 | 
					        auto file_logger = spd::rotating_logger_mt("file_logger", filename, 1024 * 1024 * 5, 3);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user