XForms error message spams useful error information out of logfile

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

XForms error message spams useful error information out of logfile

Ralf Jung
Hi list,

whenever I have to debug errors in one of my pipelines, I keep getting
frustrated by Orbeon, and I figured that maybe someone else has similar issues
and/or a solution ;-)

When I just fire a submission, and there's an error executing it, the user
interface is blocked fro around 15 to 30 seconds - i.e., whatever I click in
the browser, the server does not respond. During that time, I can examine the
actual cause of the error in the logfile, there's the stack trace and error
message there. However, when that wait time is over, Orbeon will print the
HTML source code of the error message it would display if that pipeline was
directly requested via HTTP to the logfile, and that is so long that the actual
error runs out of my console window. Due to the wait time, after changing the
pipeline, I need to wait till the XForms server notices the error before I can
give it the next try.
To prevent this from happening, I now bloated all my submissions with
something like this

<xf:submission ...>
                <xf:action ev:event="xforms-submit-error">
                        <xf:message>Error executing submission: <xf:output
value="event('error-type')"/></xf:message>
                </xf:action>
        </xf:submission>

In case of a problem, the content of error-type seem to be totally useless,
but at least this gets rid of that strange wait time. However, now the source
code of the reply is directly printed into the log, making it completely
impossible to debug the actual problem. The only stacktrace I get is the one
where the error message was received, which is of course useless.
Is there a good way to shorten the message Orbeon XForms prints when it
receives a 5xx as a reply to a submission, so that it is no more than some 10
or 20 lines long?
A work-around would be to configure the logging in a way that XForms logging
goes to a different file. I guess log4j makes this possible somehow? I tried
this
    <category name="org.orbeon.oxf.xforms.processor.XFormsServer">
        <priority value="debug"/> <!-- can also be set to info, debug -->
        <appender-ref ref="XFormsLog"/>
    </category>
Where XFormsLog is a different appender. While this correctly writes the XForms
log to that file, it *also* writes it to the logfile for everything else, so
this does not help.

I hope this all somehow makes sense...
Ralf


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms error message spams useful error information out of logfile

Tom Grahame
Hello Ralf,

I'm not really sure what your problem is, but I do have trouble debugging my Orbeon applications due to the verbosity of the logs and the speed at which they are created - I simply cannot read the output faster than it is written.

My solution is to send the output of the logs to a different file, for the period of time it takes to execute the functionality I am testing. I then look at the separate file in my own time and try to debug the problem.

I call the tail program just prior to executing the functionality

tail -0f orbeon.log > file

Then I examine file using a text editor/parsing. It's crude, but effective.

I am on Unix, you might have to do something slightly different if you are on Windows.

Hope that helps (though I suspect it might not and I have missed the point)

Tom
Reply | Threaded
Open this post in threaded view
|

Re: XForms error message spams useful error information out of logfile

Ralf Jung
In reply to this post by Ralf Jung
Hi,

>     <category name="org.orbeon.oxf.xforms.processor.XFormsServer">
>         <priority value="debug"/> <!-- can also be set to info, debug -->
>         <appender-ref ref="XFormsLog"/>
>     </category>
> Where XFormsLog is a different appender. While this correctly writes the
> XForms log to that file, it *also* writes it to the logfile for everything
> else, so this does not help.
I fixed this part by changing it to

<category name="org.orbeon.oxf.xforms.processor.XFormsServer"
additivity="false"> <!-- additivity: don't double-print -->
    <priority value="info"/> <!-- can also be set to info, debug -->
    <appender-ref ref="XFormsLog"/>
</category>

Which now makes it possible to read the actual backtrace in the main logfile,
while XForms spams another one.

Kind regards,
Ralf


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: XForms error message spams useful error information out of logfile

Ralf Jung
In reply to this post by Tom Grahame
Hi Tom,

> I'm not really sure what your problem is, but I do have trouble debugging
> my Orbeon applications due to the verbosity of the logs and the speed at
> which they are created - I simply cannot read the output faster than it is
> written.
>
> My solution is to send the output of the logs to a different file, for the
> period of time it takes to execute the functionality I am testing. I then
> look at the separate file in my own time and try to debug the problem.
>
> I call the tail program just prior to executing the functionality
>
> tail -0f orbeon.log > file
>
> Then I examine file using a text editor/parsing. It's crude, but effective.
>
> I am on Unix, you might have to do something slightly different if you are
> on Windows.
>
> Hope that helps (though I suspect it might not and I have missed the point)
I am on Linux, so this would work. And I think you got the point just fine as
you basically described the same problem - well, one of the two. I solved this
by writing XForms logs to a different file than the rest of Orbeon logs, see the
other mail I just sent (my email app took a bit longer to receive this one so
I did not yet see it). In orbein.log, I can then read the backtrace before it
is spammed out, as the really large output (the HTML source of the error
emssage reply) is sent to xforms.log, I attached the log4j.xml file for
reference. This still makes xforms.log mostly useless, but at least I get the
stacktraces I need.

The other problem, that it takes Orbeon some 20 seconds to notice there
actually is an error, seems to be unrelated.

Kind regards,
Ralf


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

log4j.xml (5K) Download Attachment