I know this question is a bit peripheral, but I’m a bit confused, because I really don’t know whether to use parentheses in method call logp or not.
I usually use this:
LOGGER.logp(WARNING, "MyClass", "myMethod()", "Error while ...");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is not necessary, if you need for your understanding you can use
()mostly we dont.Even if you use
log.warning("warning message");this will log method name and class name. If you need more formatting additionally, you can add Formatter to the log handler.