mldonkey-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mldonkey-devel] RFC : logging in mldonkey


From: spiral voice
Subject: Re: [Mldonkey-devel] RFC : logging in mldonkey
Date: Sun, 09 May 2004 22:08:37 +0200

Fortin Denis wrote:
I would like to discuss the way we are logging messages in mldonkey.

Hi,

I began testing your patch but I found some stuff missing.
As I compile i386 cores on a i686 machine I have to do this before ./configure

cd config; cp Makefile.config.i386.in Makefile.config.in; cd ..

You added
address@hidden@
to config/Makefile.config.in but not to the CPU depending files, the attached patch solves this.
Without it the core does not compile!

When compiling DirectConnect and Opennapster modules this happens,
CVS 2-5-21 with patch 3039, the attached patch and logging.patch was used:
ocamlopt -inline 10 -I src/utils/cdk -I src/daemon/chat -I src/utils/lib -I src/utils/net -I tools -I src/daemon/common -I src/daemon/driver -I src/utils/mp3tagui -I src/config/unix -I src/gtk/newgui -I src/gtk/gui2 -I src/gtk/configwin -I src/gtk/okey -I src/gtk/gpattern -I icons/tux -I +lablgtk -I src/gtk/progress -I src/im -I src/im/yahoo -I src/im/irc -I src/networks/direct_connect -I src/networks/opennap -I src/networks/gnutella -I src/networks/gnutella2 -I src/networks/fasttrack -I src/networks/fileTP -I src/networks/bittorrent -I src/networks/donkey -I src/networks/soulseek -I +camlp4 -pp "camlp4o ./tools/pa_log.cmo q_MLast.cmo -VDEBUG" -c src/networks/direct_connect/dcProtocol.ml File "src/networks/direct_connect/dcProtocol.ml", line 604, characters 14-15:
Parse error: [type] expected after '(' (in [type])
Preprocessor error
make: *** [src/networks/direct_connect/dcProtocol.cmx] Error 2

ocamlopt -inline 10 -I src/utils/cdk -I src/daemon/chat -I src/utils/lib -I src/utils/net -I tools -I src/daemon/common -I src/daemon/driver -I src/utils/mp3tagui -I src/config/unix -I src/gtk/newgui -I src/gtk/gui2 -I src/gtk/configwin -I src/gtk/okey -I src/gtk/gpattern -I icons/tux -I +lablgtk -I src/gtk/progress -I src/im -I src/im/yahoo -I src/im/irc -I src/networks/opennap -I src/networks/gnutella -I src/networks/gnutella2 -I src/networks/fasttrack -I src/networks/fileTP -I src/networks/bittorrent -I src/networks/donkey -I src/networks/soulseek -I +camlp4 -pp "camlp4o ./tools/pa_log.cmo q_MLast.cmo -VDEBUG" -c src/networks/opennap/opennapProtocol.ml
File "src/networks/opennap/opennapProtocol.ml", line 774, characters 14-15:
Parse error: [type] expected after '(' (in [type])
Preprocessor error
make: *** [src/networks/opennap/opennapProtocol.cmx] Error 2

Calling ocamlopt -verbose shows this:
+ camlp4o ./tools/pa_log.cmo q_MLast.cmo -VDEBUG src/networks/opennap/opennapProtocol.ml > /tmp/camlpp875462
File "src/networks/opennap/opennapProtocol.ml", line 774, characters 14-15:

After disabling both networks, I am getting to the newgui part. Without
export OCAMLRUNPARAM="l=256M"
the splash screen of Newgui does not compile:

ocamlopt -inline 10 -I src/utils/cdk -I src/daemon/chat -I src/utils/lib -I src/utils/net -I tools -I src/daemon/common -I src/daemon/driver -I src/utils/mp3tagui -I src/config/unix -I src/gtk/newgui -I src/gtk/gui2 -I src/gtk/configwin -I src/gtk/okey -I src/gtk/gpattern -I icons/tux -I +lablgtk -I src/gtk/progress -I src/im -I src/im/yahoo -I src/im/irc -I src/networks/gnutella -I src/networks/gnutella2 -I src/networks/fasttrack -I src/networks/fileTP -I src/networks/bittorrent -I src/networks/donkey -I src/networks/soulseek -I +camlp4 -pp "camlp4o ./tools/pa_log.cmo q_MLast.cmo -VDEBUG" -c icons/tux/splash_screen_xpm.ml
File "icons/tux/splash_screen_xpm.ml", line 3904, characters 14-15:
Uncaught exception: Stack_overflow
Preprocessor error

This did not happen before and seems to be related to the debugging macros included in the compile command.

Another question, what are your plans about the existing logging verbosity:

       (* A space-separated list of keywords. Each keyword triggers
         printing information on the corresponding messages:
         mc : debug client messages
         mct : debug emule clients tags
         ms : debug server messages
         connect : debug connections
         net : debug net
         verb : debug other
         loc : debug source research
         sp : debug source propagation
         sm : debug source management
         do : some download warnings
         up : some upload warnings
         unk : unknown messages
         ov : overnet
         share: debug sharing
         md4 : md4 computation
         udp : udp messages
         hc: http_client messages
         hs: http_server messages
        *)
verbosity = ""

I like the way I can switch on context depended logging, for example mct to hunt for new emule mods. How does this fit into your new logging scheme? Should this verbosity output function and all its dependencies only be enabled if --enable-verbosity=debug? This would be my suggestion.

But what about the debug_client stuff? This should IMHO be available not only in --enable-verbosity=debug, but also in the standard --enable-verbosity=info.
Or are you planning to leave some debug stuff the way it currently is?

- spiralvoice

_________________________________________________________________
Die ultimative Fan-Seite für den MSN Messenger http://www.ilovemessenger.de Emoticons und Hintergründe kostenlos downloaden!

Attachment: makefile_config2.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]