Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

How do you disable logging? #52

Closed Curve closed 5 years ago

Curve commented 5 years ago

Title says it

eao197 commented 5 years ago

If you take a look at the definition of default_traits_t or default_single_thread_traits_t you'll see usage of null_logger_t type. If that type is used in server traits then RESTinio doesn't log anything.

So if you don't need logging then use restinio::null_logger_t in your server's traits or use restinio::default_traits_t or restinio::default_single_thread_traits_t as traits type for your server.