• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

logging and documentation

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ranchers!

I have 2 questions. First concerning logging:

(1) Is logging required even though not explicitly mentioned in the instructions? If so, logging on server AND client side is necessary?

(2) My instructions:
You must provide basic user documentation...This documentation must be in one of these three formats:

* HTML
* Plain text (not a wordprocessor format)
* Within the application as a help system.

All the gui examples presented here have the user documentation within the application as a help system. Would it be bad style to just add a plain text file realizing the 2cnd possible choice. So the gui would remain without any file menu.

Thanks for your opinions.
Y.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2) Kasper, the guy that got 100% (400/400), had a txt file, so I don't think that would be a problem.

As for 1), I don't know. There are NO requirements for logging so I'm not doing it. After reading Kasper's (very good) description, I'm just doing the "musts" and nothing more...but then I'm only going to send my assignment in next week...
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Brian has stated logging isn't a requirement of the project, however I would recommend using logging and have found it very useful for debugging/testing the application, especially in the Data class for locking etc.

I don't think you will lose any marks for adding logging as long as it doesn't impact the readablity of the code.

Regards
Jason
 
Yupp Cook
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks for your response.
I decided to use logging.

Problem now it doesn't only log to a file but also the console.
I ve no idea how to turn console logging off. I tried to remove all Hanlders but there aren't any.

Any idea? This is a code fragment:

private static Logger logger = null;

static {
logger = Logger.getLogger("suncertify.Logger");
Handler handler;
try {
handler = new FileHandler(Constants.LOG_FILE, true);
}
catch(IOException ioe) {
System.out.println("File logging not initialized.");
System.exit(0);
}

handler.setFormatter(new SimpleFormatter());
logger.addHandler(handler);
logger.setLevel(Level.ALL );
}
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This easiest way is to modify your logging.properties instead of code, which you should find under your JAVA_HOME/jre/lib directory.



to



Regards
Jason
 
Yupp Cook
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found it myself.

logger.setUseParentHandlers(false);

turns Console logging off.

Thank you anyway.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic