
Jens Seidel wrote:
Hi John,
On Tue, Oct 30, 2007 at 04:06:51PM +0200, John Torjo wrote:
On Tue, Oct 30, 2007 at 01:02:26PM +0200, John Torjo wrote:
I've completed a major update of Boost Log: http://torjo.com/log2/
Feedback is most welcome!
I tried to compile it but noticed many errors. The attached patch fixes a few (g++ 4.3 snapshot and g++ 4.1 used for testing).
You include boost/shmem/shmem_named_shared_object.hpp which I do not find in Boost trunk and sandbox. Where can I find this file?
This was an old library - could be that it's not here anymore - I need to thoroughly check this - I just ported it from the first version of my lib. I will look into this at a later time. So for, now, just an #if 0 altogether ;)
OK.
I think i solved it ;) I've committed everything to SVN.
I attached another patch which allows now to properly compile at least each header file (independently) of Boost.Log.
I fixed also really many missing includes, maybe you should check now for circular dependencies ... (I recommend graphviz tools). Maybe you don't have to include all files but can add forward declarations?
In the sample code you include stdafx.h which includes itself tchar.h.
Yes my mistake, sorry - it's already fixed.
Note : I've fixed all the issues you found.
Except one.
But I don't have gcc 4.1/4.3
NO, this is no true! gcc is Open Source otherwise I would not use it, so you have access to it! To be honest I really wonder why you seem to use a non free system (do you know ReactOS :-?) but OK let's ignore this considering that your library is also Open Source :-)
I tested gcc 3.3, 3.4, 4.1, 4.2 and 4.3.
I know it's open source ;) I only have the 3.4.2 version at this time. Most likely I'll get more versions in the future.
- could you please check that it now compiles fine? Thanks!
With the new patch it works much better. I still need to test the sample code. What's with lib/logging/tests/donot_use? If I really should not use it I suggest you remove it otherwise please rename it (I would also expect it to be called do_not_use instead of donot_use).
template<class msg_type> void write( const msg_type& msg) { convert_dest::write(msg, (*m_out) ); - if ( m_out->ftellg() > m_flags.max_size_bytes()) { + // error: 'struct std::basic_ofstream<char, std::char_traits<char> >' has no member named 'ftellg'
*typo ;) should have been tellg()
No, tellp as m_out is of type ostream!?
Yes, right.
Be honest, did you really try to compile all your files as well? Since e.g. boost/logging/writer/ts_write.hpp contained not the proper namespace I wonder whether your compiler is indeed so buggy or you just forgot testing some files (which is not a big problem for me as I had some fun that's why).
I did not compile - the rolling_file is a port from the old version. The thing is I don't have time to do everything ;) It's on my todo list ;) This is true for ts_write.hpp as well - note that I've implemented it, and it's next thing on my todo list - add TLS/test thread-safety.
Not sure whether I have the time to port my code to use your new lib instead of the old one. Let's see.
PS: Nice to see that you are responsive. Other people still ignore patches I sent them ...
Thanks ;) =================================================================== --- boost/logging/format/formatter/defaults.hpp (Revision 40606) +++ boost/logging/format/formatter/defaults.hpp (Arbeitskopie) @@ -24,6 +24,7 @@ #include <boost/logging/detail/fwd.hpp> #include <boost/logging/detail/manipulator.hpp> #include <boost/logging/format/formatter/time.hpp> +#include <sstream> // std::basic_ostringstream #include <stdio.h> Why use <sstream> ? I tried to minimize dependencies. In defaults.hpp there's no need for basic_ostringstream. Note: I've committed all to SVN Best, John -- http://John.Torjo.com -- C++ expert ... call me only if you want things done right