• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logger and assertions

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you
 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic