<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
h2
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:14.0pt;
font-family:Arial;
font-style:italic;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:.5in .5in .5in .5in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi - Sorry in advance if this is a FAQ: I didn't find an
answer after searching for a while, hence this email...<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>On the one hand, I'm using a SocketAppender for sending serialized
<b><span style='font-weight:bold'>LoggingEventVO</span></b> objects from some
of my company's software (which I help develop) to a custom consumer of such
events. That works just fine.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>But now I also want to configure a "logback.xml"
file so that the same kind of serialized <b><span style='font-weight:bold'>LoggingEventVO</span></b>
objects can alternatively be captured to a file. We need that when either
QA engineers or end-users are running the software, but do not have access to
the socket server that I use (and hence can't use the SocketAppender).
The hope is that then the QA engineer or end-user could get that log file to
me, and I could have my serialized event consumer read from the file, instead
of getting the data from a socket connection. Then I can diagnose that QA
person's problem, or end-user's problem.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>However, I don't know what particular logback XML to use.
I tried a "FileAppender" / "ObjectStreamEncoder"
combination, but the file ended up being empty (whereas a simple
ConsoleAppender proved there were in fact events to capture). Here's my
failed XML:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <appender name="SERIALIZED_FILE"
class="ch.qos.logback.core.FileAppender"><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <file>log_output_serialized.bin</file><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>
<append>false</append><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <encoder
class="ch.qos.logback.core.encoder.ObjectStreamEncoder" /><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </appender><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <root level="ALL"><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <appender-ref
ref="STDOUT" /><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> <appender-ref
ref="SERIALIZED_FILE" /><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'> </root><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Do I need to write my own variant of
"FileAppender": one which (like SocketAppender) doesn't use an
Encoder, but instead bakes in the code to serialize LoggingEventVO objects?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks in advance,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Rich Wagner<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=gray face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:gray'>Rich Wagner | Senior Software Engineer |
StreamBase Systems, Inc., 181 Spring Street, <u1:place u2:st="on"><u1:City u2:st="on">Lexington</u1:City>,
<u1:State u2:st="on">MA</u1:State> <u1:PostalCode u2:st="on">02421</u1:PostalCode></u1:place><o:p></o:p></span></font></p>
<p class=MsoNormal><u><font size=2 color=gray face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:gray'><a
href="mailto:rwagner@streambase.com" title="mailto:rwagner@streambase.com">rwagner@streambase.com</a></span></font></u><font
size=2 color=gray face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:gray'> | (p) +1 781-761-0868 | </span></font><font size=2 face=Arial><span
style='font-size:11.0pt;font-family:Arial'><a href="http://www.streambase.com/"
title="http://www.streambase.com/"><font size=2 color=gray><span
style='font-size:10.0pt;color:gray'><span title="http://www.streambase.com/"><span
title="http://www.streambase.com/">http://www.streambase.com</span></span></span></font></a></span></font><font
size=2 color=gray face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:gray'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=gray face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:gray'><br>
</span></font><font size=2 face=Arial><span style='font-size:11.0pt;font-family:
Arial'><a
href="http://www.time.com/time/specials/packages/article/0,28804,1948486_1948485_1948478,00.html"
title="http://www.time.com/time/specials/packages/article/0,28804,1948486_1948485_1948478,00.html"><font
size=2 color=gray><span style='font-size:10.0pt;color:gray'><span
title="http://www.time.com/time/specials/packages/article/0,28804,1948486_1948485_1948478,00.html"><span
title="http://www.time.com/time/specials/packages/article/0,28804,1948486_1948485_1948478,00.html">StreamBase
- 2010 World Economic Forum Technology Pioneer</span></span></span></font></a></span></font><font
size=2 face=Calibri><span style='font-size:11.0pt;font-family:Calibri'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>