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