Swiz 1.3.1 日志处理器
我尝试了一切方法让 Swiz 运行 LogProcessor。 以下是项目 Foomonger。 然而,我担心这些资源指的是旧版本的 swiz。
我想在没有 SwizLoggerConfig 的情况下实现 LogProceccor,因为我只需要能够将一些信息记录到 Thunderbolt。我不需要进一步的配置。之后我开始编写自己的 AbstractSwizLoggingTarget。
如果我将类复制到我的环境中,我会收到以下错误: TypeError: 错误 #1034: Typumwandlung fehlgeschlagen: org.swizframework.utils.logging::SwizLogger@e8aa8b1 kann nicht in mx.logging.ILogger umgewandelt werden。 (抱歉德语文本)
Der Quelltext:
package de.axurit.util
{
import org.swizframework.core.Bean;
import org.swizframework.processors.BaseMetadataProcessor;
import org.swizframework.processors.ProcessorPriority;
import org.swizframework.reflection.IMetadataTag;
import org.swizframework.utils.logging.SwizLogger;
public class LoggerProcessor extends BaseMetadataProcessor
{
protected static const LOGGER:String = "Logger";
public function LoggerProcessor()
{
super([LOGGER]);
}
override public function get priority():int
{
return ProcessorPriority.INJECT +1;
}
override public function setUpMetadataTag(metadataTag:IMetadataTag, bean:Bean):void
{
var logger:SwizLogger = SwizLogger.getLogger(bean.source);
bean.source[metadataTag.host.name] = logger; //here occurs the error
}
override public function tearDownMetadataTag(metadataTag:IMetadataTag, bean:Bean):void
{
bean.source[metadataTag.host.name] = null;
}
}
}
任何人都可以帮助我如何在 Swiz 中创建一个自己的用于中央日志记录(而不是调试)的 MetadataProcessor。我您需要更多代码,请告诉我,
谢谢 坦率
i try everything to get the LogProcessor for Swiz to run.
Here are the project Foomonger.
I fear however, the ressources refer to an old version of swiz.
I want to implement the LogProceccor without the SwizLoggerConfig, because i need only the possibility to log some informations to thunderbolt. i need no further configuration. After that i start to write my own AbstractSwizLoggingTarget.
If i copy the class into my environment, i get the follow error:
TypeError: Error #1034: Typumwandlung fehlgeschlagen: org.swizframework.utils.logging::SwizLogger@e8aa8b1 kann nicht in mx.logging.ILogger umgewandelt werden.
(Sorry for the german text)
Der Quelltext:
package de.axurit.util
{
import org.swizframework.core.Bean;
import org.swizframework.processors.BaseMetadataProcessor;
import org.swizframework.processors.ProcessorPriority;
import org.swizframework.reflection.IMetadataTag;
import org.swizframework.utils.logging.SwizLogger;
public class LoggerProcessor extends BaseMetadataProcessor
{
protected static const LOGGER:String = "Logger";
public function LoggerProcessor()
{
super([LOGGER]);
}
override public function get priority():int
{
return ProcessorPriority.INJECT +1;
}
override public function setUpMetadataTag(metadataTag:IMetadataTag, bean:Bean):void
{
var logger:SwizLogger = SwizLogger.getLogger(bean.source);
bean.source[metadataTag.host.name] = logger; //here occurs the error
}
override public function tearDownMetadataTag(metadataTag:IMetadataTag, bean:Bean):void
{
bean.source[metadataTag.host.name] = null;
}
}
}
Can anyone help me how to create an own MetadataProcessor for central logging (not debuggin) in Swiz. I you need more code, let me know that
Thank you
Frank
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一段漫长而艰难的旅程。这是结果:
It was a long, hard journey. Here is teh result: