F
fritz-bayer
Hello,
I have been using the logging API to log HTTP requests. I have an
object, which resembles a HTTP request and has methods to extract the
typical fields of a HTTP request.
Now, I have noticed that you can only pass log messages as a String and
not as an object. Also I saw that Formatters format "around" this
String. I think that is quite a limitation for my purpose.
What's if I have different Log Formats, which I would like to apply.
For example, there are different levels of verbosity. The apache log
format "combined" sends more output then "common". Maybe I also want to
define my own custom ones.
Then I would like to have a Formatter for each output Format. Do do
that, however, Formatters would have to be able to work on those HTTP
objects, which contain the fields.
That does not seem to be possible under the current logging API or am I
missing someting here? I really don't understand, why the message is
not being stored as an Object but a String - that only limits the use
of the Formatter.
Can somebody elaborate on this. Maybe it should be brought up with Sun?
I have been using the logging API to log HTTP requests. I have an
object, which resembles a HTTP request and has methods to extract the
typical fields of a HTTP request.
Now, I have noticed that you can only pass log messages as a String and
not as an object. Also I saw that Formatters format "around" this
String. I think that is quite a limitation for my purpose.
What's if I have different Log Formats, which I would like to apply.
For example, there are different levels of verbosity. The apache log
format "combined" sends more output then "common". Maybe I also want to
define my own custom ones.
Then I would like to have a Formatter for each output Format. Do do
that, however, Formatters would have to be able to work on those HTTP
objects, which contain the fields.
That does not seem to be possible under the current logging API or am I
missing someting here? I really don't understand, why the message is
not being stored as an Object but a String - that only limits the use
of the Formatter.
Can somebody elaborate on this. Maybe it should be brought up with Sun?