Comments (10)
Is the library already in Boost.Trunk or to be released in 1.43?
from cpp-netlib.
Nope, but do we need to wait for this? It might take a long time before it's part of a formal release, and I think it could be a useful example because users of cpp-netlib might also use the boost logging library.
Furthermore, an example of the HTTP server with logging would be useful (even if it's only std::cerr
).
from cpp-netlib.
Let's wait for Boost.Log to be included in a release. We can put the logging example in the HTTP server, that's fine, but let's not use something that's not yet "officially released".
from cpp-netlib.
OK, I've updated the issue header.
from cpp-netlib.
Closed by ade7513 -- use Boost.String_algorithm is_digit to determine version major and minor characters, according to RFC.
from cpp-netlib.
Eh, this isn't supposed to be closed. Darn I need to fix the commit messages to use cpp-netlib/# to get this madness under control. :D
from cpp-netlib.
I'm coming up to speed on the project and would like to take a stab at this one. I just took a look at Boost.log and it seem like it'd be pretty straightforward to implement.
from cpp-netlib.
That would be great! I agree that the implementation would be straightforward. Do you already have an implementation in mind? If you have any questions, comments, ideas etc. please bring it up on the mailing list where you'll find a small (but growing) community who can help.
from cpp-netlib.
My plan was to add the multithreaded version of boost::log::sources::basic_logger
as an ivar to the http server handler. I could print a few statistics every time the handler functor is called. Possibly add a command line parameter to specify a logging sink (text file, stdout, etc).
When is the log member function in the handler called? I grep'd around and it's only called in http::sync_connection::start()
when setting the socket options fails. Is this something that needs to be added in the library code as well?
Another thing to consider is that Boost 1.47 does not include Boost.Log in the release. I (wrongly) assumed it would be in. Let me know what you guys think.
from cpp-netlib.
Since Boost.Log is not yet in the official Boost release, I would think it should be alright if you just made an example that actually did something in the body of the log function. This could be as simple as counting the number of errors encountered in requests and showing that it actually reports the errors.
If you look closely enough at the code there's not a lot of information being provided to the log function. I'm thinking in 1.0 we should at least have better statistical hooks and extension points to the server implementation.
For the purpose of the example though having something simple should be a good first step. We can then look at the deficiencies of the current approach and formulate a plan to address the issues we uncover then.
Does that work? Thanks again for taking this one on!
from cpp-netlib.
Related Issues (20)
- Does not compile with Boost 1.70 and newer HOT 27
- Stable 0.13.0-final doesn't build on Ubuntu 18.04 HOT 1
- cpp-netlib 0.13 'cxxopts.hpp' file not found #include "cxxopts.hpp" after using submodule init and update HOT 2
- How a client post one image(cv::Mat) to a server by using cpp-netlib? HOT 1
- cpp-netlib build error HOT 1
- Prominent hello world example not up to date
- installing cpp-netlib using vcpkg gives error C1083 cannot open source/include file "boost/asio/stream_socket_service.hpp" in compiler
- Cant build cpp-netlib with boost 1.74.0 HOT 1
- Cant run project with cpp-netlib after build with vcpkg
- put this library to conan --> conan.io
- 这个库,还要继续做下去吗? HOT 4
- Could not find a package configuration file provided by "cppnetlib" (requested version 0.13.0) with any of the following names HOT 1
- boost\network\uri\uri.hpp(336,40): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data HOT 1
- PATCH support in client?
- Build error "'get_io_service': is not a member of 'boost::asio::ip::basic_resolver<boost::asio::ip::udp,boost::asio::any_io_executor>" on boost 1.78.0
- boost\network\uri\encode.hpp(121,28): warning C4244: 'argument': conversion from 'CharT' to 'char', possible loss of data
- Confusing boost namespace HOT 1
- vcpkg with boost 1.83 HOT 2
- UserProjectAccountProblem - official download links on website broken HOT 2
- ‘class boost::asio::ip::basic_resolver<boost::asio::ip::udp> has no member named ‘get_io_service’
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-netlib.