[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: [xmlblaster] about Log & Jutils

Juergen Birkle a écrit:

Hello Cyrille,

If this behavior doesn't exists (setting logLevel for each LogDevice)
perhaps there are some reasons ?
If no reasons, perhaps I can try to add this feature., if jutils
authors find this fine enough ;o)

Juergen.Birkle at doubleSlash.de is the maintainer, probably
he can comment on it,

I would prefer to keep it as it is. The reason for this architecture is a single point of configuration and an easy interface. The logging architecture allows to place more than one LogableDevice into a LogChannel, but the main idea was to place 2 different type of LogableDevices into it, e.g. a LogDeviceFile and a LogDeviceMail. And in this usecase there should normaly be the same information in the file as in the mail.

But there is also an easy way to get what you want.
Yust implement your own "LogDeviceFile???.java" and make it configurable.
You can "name" this 2 different LogDeviceFile??? objects at construction and
they read their LogLevels out of a global (static) Property object, so you
could configure this two LogDeviceFile??? objects via parameter on startup
or via a configuration file.

Hope this solution is ok for you. If you have any further ideas how to
extend the function of the log package without breaking the interfaces and
keeping the usability as easy as possible please contact me.

Hello & Thanks Juergen.

Your idea is nice, I'll do that.

Else, there is a LogManager. What is it for ?
Why we can't call Log method (error, info ...) to it, then it will dispatch calls to each LogChannel ??


Juergen Birkle

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature