1 /* 2 Copyright (C) 2000-2007 MySQL AB 3 Use is subject to license terms 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; version 2 of the License. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; see the file COPYING. If not, write to the 16 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 17 MA 02110-1335 USA. 18 */ 19 20 21 /* yaSSL log interface 22 * 23 */ 24 25 #ifndef yaSSL_LOG_HPP 26 #define yaSSL_LOG_HPP 27 28 #include "socket_wrapper.hpp" 29 30 #ifdef YASSL_LOG 31 #include <stdio.h> 32 #endif 33 34 namespace yaSSL { 35 36 typedef unsigned int uint; 37 38 39 // Debug logger 40 class Log { 41 #ifdef YASSL_LOG 42 FILE* log_; 43 #endif 44 public: 45 explicit Log(const char* str = "yaSSL.log"); 46 ~Log(); 47 48 void Trace(const char*); 49 void ShowTCP(socket_t, bool ended = false); 50 void ShowData(uint, bool sent = false); 51 }; 52 53 54 } // naemspace 55 56 #endif // yaSSL_LOG_HPP 57