tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/3771-logger-and-traceRobotlegs: Discussion 2013-08-17T10:52:49Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/276672472013-07-12T07:02:32Z2013-07-12T07:02:32ZLogger and trace<div><p>To reroute all logging to flash-console you'lle need to create
an adapter that implements <a href=
"https://github.com/robotlegs/robotlegs-framework/blob/master/src/robotlegs/bender/framework/api/ILogTarget.as">
ILogTarget</a> and add it as a logging target to the
context:<br></p>
<pre>
<code>context. addLogTarget(new FlashConsoleLogTarget(context));</code>
</pre>
<p>If you want to provide channeled logging you'll need to mimic
the extensions in <code>extensions.enhancedLogging</code> but with
your own logger interface and implementations.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/276672472013-07-16T07:40:16Z2013-07-16T07:40:16ZLogger and trace<div><p>Just to clarify :)<br>
will this make native trace() from other extensions also go to
FlashConsole?</p>
<p>I am allready routing all ILogger channels to console.</p></div>matejtag:robotlegs.tenderapp.com,2009-10-18:Comment/276672472013-07-16T08:55:51Z2013-07-16T08:55:51ZLogger and trace<div><blockquote>
<p>will this make native trace() from other extensions also go to
FlashConsole?</p>
</blockquote>
<p>No, AFAIK that's impossible.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/276672472013-07-16T09:02:25Z2013-07-16T09:02:25ZLogger and trace<div><p>BTW, The extensions included in Robotlegs do not use native
trace(), they all use the logger, so you can redirect their output
at any time.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/276672472013-07-16T09:50:53Z2013-07-16T09:50:53ZLogger and trace<div><p>yes ofcourse :)</p>
<p>I am talking about external libraries.<br>
This doesnt have to do anything with robotlegs directly, I was
wandering if there is a way to capture native trace, and then
output the same one to robotlegs logger.</p></div>matej