• 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

[Ask] Logging with Log4j in many class

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends..

i have a question..
How to Logging with Logger class in many my class?

example for this one :

i have Category form class which have 5 subclasses..
in Superclass (CategoryFormAction), i have define :

for logging CategoryFormAction..

example i have subclasses :
1.) AddingCategory
2.) DeletingCategory
3.) etc..

and does i have to define the Logger class in my sub class?
example like this one :
1.) in AddingCategory Class, i define : private static Logger logger=Logger.getLogger(AddingCategory.class);
2.) in DeletingCategory Class, i define : private static Logger logger=Logger.getLogger(DeletingCategory.class);

is it true?..

thank's in advance..





 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when you try it?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic