$OpenBSD: patch-logger_hh,v 1.1.1.1 2018/12/29 14:29:08 sthen Exp $

Index: logger.hh
--- logger.hh.orig
+++ logger.hh
@@ -77,15 +77,19 @@ class Logger (public)
   */
   Logger& operator<<(const char *s);
   Logger& operator<<(const string &s);   //!< log a string
-  Logger& operator<<(int);   //!< log an int
-  Logger& operator<<(double);   //!< log a double
-  Logger& operator<<(unsigned int);   //!< log an unsigned int
-  Logger& operator<<(long);   //!< log an unsigned int
-  Logger& operator<<(unsigned long);   //!< log an unsigned int
-  Logger& operator<<(unsigned long long);   //!< log an unsigned 64 bit int
   Logger& operator<<(const DNSName&); 
   Logger& operator<<(const ComboAddress&); //!< log an address
   Logger& operator<<(Urgency);    //!< set the urgency, << style
+
+  template<typename T> Logger & operator<<(T i) {
+	static_assert(std::is_trivial<T>::value,
+	       "this logger method must only be used with trivial types");
+
+	ostringstream tmp;
+	tmp<<i;
+	*this<<tmp.str();
+	return *this;
+  }
 
   Logger& operator<<(std::ostream & (&)(std::ostream &)); //!< this is to recognise the endl, and to commit the log
 
