From c83f8f485a93df7f53d681f3b7c55c2fe91e81db Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 27 Jan 2013 10:36:19 -0600 Subject: [PATCH] adds pass through logging adaptor to endpoint --- websocketpp/endpoint.hpp | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index 7905bcd4db..988a0a0918 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -125,6 +125,54 @@ public: return m_is_server; } + /********************************/ + /* Pass-through logging adaptor */ + /********************************/ + + /// Set Access logging channel + /** + * Set the access logger's channel value. The value is a number whose + * interpretation depends on the logging policy in use. + * + * @param channels The channel value(s) to set + */ + void set_access_channels(log::level channels) { + m_alog.set_channels(channels); + } + + /// Clear Access logging channels + /** + * Clear the access logger's channel value. The value is a number whose + * interpretation depends on the logging policy in use. + * + * @param channels The channel value(s) to clear + */ + void clear_access_channels(log::level channels) { + m_alog.clear_channels(channels); + } + + /// Set Error logging channel + /** + * Set the error logger's channel value. The value is a number whose + * interpretation depends on the logging policy in use. + * + * @param channels The channel value(s) to set + */ + void set_error_channels(log::level channels) { + m_elog.set_channels(channels); + } + + /// Clear Error logging channels + /** + * Clear the error logger's channel value. The value is a number whose + * interpretation depends on the logging policy in use. + * + * @param channels The channel value(s) to clear + */ + void clear_error_channels(log::level channels) { + m_elog.clear_channels(channels); + } + /*************************/ /* Set Handler functions */ /*************************/