Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e98160

Browse files
committed
Define BOOST_NETWORK_MESSAGE if BOOST_NETWORK_DEBUG
The internal macro BOOST_NETWORK_MESSAGE is meantto insert debugging output that by default printsto std::cerr. This macro is only enabled ifBOOST_NETWORK_DEBUG is defined. This is not meantto be exposed and is only meant to be for debuggingpurposes during development.
1 parent930013f commit9e98160

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

‎boost/network/detail/debug.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef BOOST_NETWORK_DEBUG_HPP_20110410
2+
#defineBOOST_NETWORK_DEBUG_HPP_20110410
3+
4+
// (c) Copyright 2011 Dean Michael Berris.
5+
// Distributed under the Boost Software License, Version 1.0.
6+
// (See accompanying file LICENSE_1_0.txt or copy at
7+
// http://www.boost.org/LICENSE_1_0.txt)
8+
9+
/** BOOST_NETWORK_MESSAGE is a debugging macro used by cpp-netlib to
10+
print out network-related errors through standard error. This is
11+
only useful when BOOST_NETWORK_DEBUG is turned on. Otherwise
12+
the macro amounts to a no-op.
13+
*/
14+
#ifdef BOOST_NETWORK_DEBUG
15+
#include<iostream>
16+
#ifndef BOOST_NETWORK_MESSAGE
17+
#defineBOOST_NETWORK_MESSAGE(msg) std::cerr <<"[DEBUG" << __FILE__ <<':' << __LINE__ <<"]:" << msg << std::endl;
18+
#endif
19+
#else
20+
#ifndef BOOST_NETWORK_MESSAGE
21+
#defineBOOST_NETWORK_MESSAGE(msg)
22+
#endif
23+
#endif
24+
25+
#endif/* end of include guard: BOOST_NETWORK_DEBUG_HPP_20110410*/

‎libs/network/test/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ project network_test :
2424
<source>/boost//thread
2525
<source>/boost//filesystem
2626
<define>BOOST_NETWORK_ENABLE_HTTPS
27+
<variant>debug:<define>BOOST_NETWORK_DEBUG
2728
<toolset>gcc:<linkflags>-lpthread
2829
<toolset>gcc:<linkflags>-lssl
2930
<toolset>gcc:<linkflags>-lcrypto

‎libs/network/test/http/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project network_test/http :
1212
requirements
1313
<include>../../../../
1414
<include>../
15+
<variant>debug:<define>BOOST_NETWORK_DEBUG
1516
;
1617

1718
run client_constructor_test.cpp /cpp-netlib//cppnetlib-uri-parsers ;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp