You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2005/04/13 14:43:13 UTC
Re: svn commit: r161175 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
lgawron@apache.org wrote:
>
> Extend CocoonLogFormatter with the ability to log request query string prepended with '?' character.
Nice! I don't get one thing though: why you are adding '?' in the code when you
can easily have it in the format string?
<format type="cocoon">%5.5{priority} %{time} [%{category}] (%{uri}?%{query})
%{class:short}: %{message}\n</format>
Vadim
Re: svn commit: r161175 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Leszek Gawron wrote:
> Vadim Gritsenko wrote:
>
>> Leszek Gawron wrote:
>>
>>> Vadim Gritsenko wrote:
>>>
>>>> <format type="cocoon">%5.5{priority} %{time} [%{category}]
>>>> (%{uri}?%{query}) %{class:short}: %{message}\n</format>
>
> Can I make that default configuration? If so we should warn users that
> the logged info may contain confidential data.
Dunno... You can add it to the comments though, so at least it is documented.
Vadim
Re: svn commit: r161175 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Vadim Gritsenko wrote:
> Leszek Gawron wrote:
>
>> Vadim Gritsenko wrote:
>>
>>> lgawron@apache.org wrote:
>>>
>>>>
>>>> Extend CocoonLogFormatter with the ability to log request query
>>>> string prepended with '?' character.
>>>
>>>
>>>
>>> Nice! I don't get one thing though: why you are adding '?' in the
>>> code when you can easily have it in the format string?
>>>
>>> <format type="cocoon">%5.5{priority} %{time} [%{category}]
>>> (%{uri}?%{query}) %{class:short}: %{message}\n</format>
>>
>>
>> because if you do that:
>>
>> DEBUG (2005-04-13) 13:07.01:812 [] (Unknown-URI?)
>> ^^^^^^^^^^^^
>> Unknown-Thread/LoggerSwitch.SwitchingLogger: added logger for category
>>
>> looks a little bit funny :). It's a stupid hack I know.
>
>
> Ok :-)
Can I make that default configuration? If so we should warn users that
the logged info may contain confidential data.
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: svn commit: r161175 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Leszek Gawron wrote:
> Vadim Gritsenko wrote:
>
>> lgawron@apache.org wrote:
>>
>>>
>>> Extend CocoonLogFormatter with the ability to log request query
>>> string prepended with '?' character.
>>
>>
>> Nice! I don't get one thing though: why you are adding '?' in the code
>> when you can easily have it in the format string?
>>
>> <format type="cocoon">%5.5{priority} %{time} [%{category}]
>> (%{uri}?%{query}) %{class:short}: %{message}\n</format>
>
> because if you do that:
>
> DEBUG (2005-04-13) 13:07.01:812 [] (Unknown-URI?)
> ^^^^^^^^^^^^
> Unknown-Thread/LoggerSwitch.SwitchingLogger: added logger for category
>
> looks a little bit funny :). It's a stupid hack I know.
Ok :-)
Vadim
Re: svn commit: r161175 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
Posted by Leszek Gawron <lg...@apache.org>.
Vadim Gritsenko wrote:
> lgawron@apache.org wrote:
>
>>
>> Extend CocoonLogFormatter with the ability to log request query string
>> prepended with '?' character.
>
>
> Nice! I don't get one thing though: why you are adding '?' in the code
> when you can easily have it in the format string?
>
> <format type="cocoon">%5.5{priority} %{time} [%{category}]
> (%{uri}?%{query}) %{class:short}: %{message}\n</format>
>
>
> Vadim
because if you do that:
DEBUG (2005-04-13) 13:07.01:812 [] (Unknown-URI?)
^^^^^^^^^^^^
Unknown-Thread/LoggerSwitch.SwitchingLogger: added logger for category
looks a little bit funny :). It's a stupid hack I know.
--
Leszek Gawron MobileBox
lgawron@apache.org http://www.mobilebox.pl