RESTinio
null_logger.hpp
Go to the documentation of this file.
1 /*
2  restinio
3 */
4 
5 /*!
6  Ready to use loggers implementations.
7 */
8 
9 #pragma once
10 
11 namespace restinio
12 {
13 
14 //
15 // null_logger_t
16 //
17 
18 //! No operation logger.
19 /*!
20  Helps compiler to strip all operations associated with logging.
21 */
23 {
24  public:
25  template< typename Message_Builder >
26  constexpr void
27  trace( Message_Builder && ) const noexcept
28  {}
29 
30  template< typename Message_Builder >
31  constexpr void
32  info( Message_Builder && ) const noexcept
33  {}
34 
35  template< typename Message_Builder >
36  constexpr void
37  warn( Message_Builder && ) const noexcept
38  {}
39 
40  template< typename Message_Builder >
41  constexpr void
42  error( Message_Builder && ) const noexcept
43  {}
44 };
45 
46 } /* namespace restinio */
No operation logger.
Definition: null_logger.hpp:22
constexpr void info(Message_Builder &&) const noexcept
Definition: null_logger.hpp:32
constexpr void error(Message_Builder &&) const noexcept
Definition: null_logger.hpp:42
constexpr void warn(Message_Builder &&) const noexcept
Definition: null_logger.hpp:37
constexpr void trace(Message_Builder &&) const noexcept
Definition: null_logger.hpp:27
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container &params, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
Definition: value_or.hpp:64