Quick Start
Comments
Hi,
That error is actually saying that any tag (Class) defined in the loggingTargets tag must be a subclass (Type) of AbstractSwizLoggingTarget.
I'm new to the framework but, I assume this is something that has changed in the rc release.
Mike
You removed the lines mentioned, but still refer to them in the text above the example.
This works for me as long as there is no default implementation for the AbstractSwizLoggingTarget
<swiz:Swiz>
<swiz:loggingTargets>
<fx:Array>
<logging:SwizLoggingTargetImpl>
<logging:target>
<s:TraceTarget />
</logging:target>
</logging:SwizLoggingTargetImpl>
</fx:Array>
</swiz:loggingTargets>
</swiz:Swiz>
with a SwizLoggingTargetImpl.as
package de.maxmg.kkv.logging
{
import mx.logging.AbstractTarget;
import mx.logging.LogEvent;
import mx.logging.targets.TraceTarget;
import org.swizframework.utils.logging.AbstractSwizLoggingTarget;
import org.swizframework.utils.logging.SwizLogEvent;
public class SwizLoggingTargetImpl extends AbstractSwizLoggingTarget
{
public var target:AbstractTarget;
public function SwizLoggingTargetImpl()
{
super();
}
override protected function logEvent(event:SwizLogEvent):void
{
target.logEvent( new LogEvent( event.message, event.level ) );
}
override protected function logHandler(event:SwizLogEvent):void
{
target.logEvent( new LogEvent( event.message, event.level ) );
}
}
}
What happened to the documentation for Swiz 0.6.4? Not everyone wants to upgrade immediately and the old documentation is still needed.
Plus 1 for adding in the Swiz 0.6.4 docs. Also a compiled .swc would be nice if we just want the library and don't want to build ourselves. I know it is easy, but saves a step if I just want to run through a quick test. Also, examples seem more geared toward flex4 than flex3 (which used to be there on the old site). Having a 'legacy' section would be nice, the docs exist already.
Please indicate the url for the docs to Swiz 0.6.4. I must be going blind and don't see it.
<swiz:loggingTargets> <s:TraceTarget /> </swiz:loggingTargets>produces a compiler error, because an array is expected.
Wrapping the tt in an array produces a RTE (sorry in german):
TypeError: Error #1034: Typumwandlung fehlgeschlagen: mx.logging.targets::TraceTarget@121922c1 kann nicht in org.swizframework.utils.logging.AbstractSwizLoggingTarget umgewandelt werden.