mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
astyle+comments
This commit is contained in:
@@ -37,7 +37,7 @@ int main(int, char* [])
|
||||
spd::set_level(spd::level::debug);
|
||||
|
||||
// Create console, multithreaded logger
|
||||
auto console = spd::stdout_logger_mt("console");
|
||||
auto console = spd::stdout_logger_mt("console");
|
||||
console->info("Hello {}", 1);
|
||||
console->info("An info message example {}..", 1);
|
||||
console->info() << "Streams are supported too " << 1;
|
||||
@@ -65,7 +65,7 @@ int main(int, char* [])
|
||||
|
||||
SPDLOG_TRACE(console, "Enabled only #ifdef SPDLOG_TRACE_ON..{} ,{}", 1, 3.23);
|
||||
SPDLOG_DEBUG(console, "Enabled only #ifdef SPDLOG_DEBUG_ON.. {} ,{}", 1, 3.23);
|
||||
|
||||
|
||||
// Asynchronous logging is very fast..
|
||||
// Just call spdlog::set_async_mode(q_size) and all created loggers from now on will be asynchronous..
|
||||
size_t q_size = 1048576; //queue size must be power of 2
|
||||
@@ -94,7 +94,10 @@ int main(int, char* [])
|
||||
// Example of user defined class with operator<<
|
||||
//
|
||||
class some_class {};
|
||||
std::ostream& operator<<(std::ostream& os, const some_class&) { return os << "some_class"; }
|
||||
std::ostream& operator<<(std::ostream& os, const some_class&)
|
||||
{
|
||||
return os << "some_class";
|
||||
}
|
||||
|
||||
void custom_class_example()
|
||||
{
|
||||
|
Reference in New Issue
Block a user