On 26/12/15 16:03, Ian wrote:
> Best practice is to use the logging system, using System.out.println() for
> logging is almost universally regarded as bad practice, many static
> analysis tools will automatically flag it as a problem.
>
> The example you gave in NodeCrypto is not best practice, that should
> probably just be something like:
>
> Logger.error(this, "Could not use port: "+bindto+ ':'+portNo+": "+e, e)
>
> Freenet has it's own logging system (see here
> <https://github.com/freenet/fred/blob/088f5f479a2b8b83d813e8a77d8f2937ce9c27d1/src/freenet/support/Logger.java>),
> possibly because Freenet predates a lot of the logging frameworks, however
> we should probably be using one of the numerous logging libraries like
> Logback, as they are more flexible.
>
> Ian.

In this case it is appropriate, because the above is only shown if the
node is about to fail to start up (at least in the darknet case). See my
message explaining the current policy. Changing the policy may be
appropriate, I'm just documenting the current status quo.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devl mailing list
[email protected]
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to