This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY", log level FINER, and the given sourceMethod and sourceClass is logged.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Roel De Nijs wrote:You can create yourself a utility class which has some convenience methods for logging.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ixus See wrote:and how do I view the log files ?
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:
Ixus See wrote:and how do I view the log files ?
You mentioned that you are a team lead - I can't believe you asked that question???
Do you not encourage your team members to research, use their intuitive, try and work things out themselves. I hope you do. But I would expect a team lead to lead by example.
It quite obvious that you have made 0% effort in working this out yourself. Logging to a log file is about as fundamental a thing you can get with logging. It's like "Hello, World" in a programming language.
I found the answer in a few seconds by simply searching on Google : java.util.logging "log file". Couldn't you have done the same with this and many of your other posts?
As a bare minimum you should be searching, either on a search engine like Google or the one on the site, before you ask a question.
Roel De Nijs wrote:My utility class just logs to the console, not to seperate files because that might be tricky (which folder do you use, will you have sufficient permission to write to that folder,...)
Ixus See wrote:Anyway If i do this assignment like how I code during work, I would not have pass because I will check for everything and overload everything.
Ixus See wrote:ever heard of information explosion or overload? don't assume I didn't Google...
Ixus See wrote:I'm asking because I'm looking for answers related to this assignment rather than real world implementation
Ixus See wrote:Iis very different maybe you are still doing school projects, you will understand my dilemma if you are in my position. For me at work, we have a module entirely devoted to logging. The developers just need to register its class with the logger and logs its message according and it will save into a log file of its choosing.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
This one time, at bandcamp, I had relations with a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|