On Sun, Dec 27, 2015 at 1:20 PM, Matthew Toseland <[email protected] > wrote:
> 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) > > 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. Ok, but in that case this "policy" deviates from standard practice in Java programming, which is to use a logging framework for all log messages, even "fatal" messages. The exception might be in Freenet was a command-line app, but that's not how most people use Freenet. A fatal error should ideally be reported via FProxy, since most users aren't going to see stuff written to the console. Ian. _______________________________________________ Devl mailing list [email protected] https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
