File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logger and assertions

 
Jakub Drzazga
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody

I would like to know, it is any sense to use logging (Logger class) or assertions in SCJD? I have just started write SCJD project, there is nothing in my assignment that I should use it but I read something about it in Andew Monkhouse�s book. Please help me.
 
Jethro Borsje
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not use assertions.

As to logging: I would really recommend using this. It helped my find a few nasty bugs, especially on the server side. Using logging greatly improves your feel on what the application is doing and it which order. I think this will also improve the life of the grader, because they might be able to use your log statements in order to assess what your application is doing.
 
Karen Smrha
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also recommend logging, but be careful if you are writing to a file.

It could be that the person checking your project runs in a
directory without write permission. Your code should check
if it has write permission.

Good luck,
Karen Smrha
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I myself did not include any of those!
But that doesn't mean you guys can't do it...
[ November 19, 2008: Message edited by: Roberto Perillo ]
 
Jakub Drzazga
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use logger instead System.out.println();
Using logger can make your method easier to debug.


Jeffry Kristianto Yanuar (Java Instructor)
SCJP 5.0, SCJA, SCJD (UrlyBird 1.3.2) --> Waiting for the result
 
Jethro Borsje
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And off course you can configure the logger way in a lot of different ways while you can not do that with System.out.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic