Re: Aspect questions?
On 2/26/2012 4:08 PM, Novice wrote:
Arne Vajh?j<arne@vajhoej.dk> wrote in
news:4f4a6b1d$0$290$14726298@news.sunsite.dk:
The standard is to use the full (with package) class name as
the name of the logger.
Because logger configuration is applied tree wise, then you can
still configure at package level.
If you used package name as logger name, then you could
not configure by class.
Okay, fair enough. Hmm, I need to think through the implications of
that....
So, with respect to my common classes, should they all be in one big
package, like com.novice.common? Or is it better to group them on some
basis so that different types of common modules are in their own
packages? If grouping them is a good idea, what's the best way to group
them?
>
> I'm currently grouping mine on a more-or-less functional basis. If the
> class is essentially just a table lookup or enum, then it goes in the
> com.novice.common.lookups package. If it is a utility, it goes into
> com.novice.common.utilities. And so forth.
That is general question not specific to logging or AOP.
You need a good structure of your classes and source code.
A key factor in the decision between com.novice.common and
com.novice.common.xxxx must be the number of classes.
Do you have so many classes that it makes sense to split up?
Also, do you have any idea where to find the log records I am writing
when I use Logger.getLogger("test") in my play code? I've tried the
location stated in logging.properties and I've tried
<User Application Data Folder>\Sun\Java\Deployment\log on Windows
as suggested in
http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-
guide/tracing_logging.html
but I'm not finding it. There are files there but the days of the week
are NOT in them and that's what I wrote to my logger.
It should write to the file specified in the properties file.
May we see that?
Arne