开发者

How can I listen for trace() statements on the Flash Media Server Administration API?

I am connected to the Flash Media Server Administration API via RTMPE on port 1111 and I'd like t开发者_开发技巧o monitor calls to trace() from the server side actionscript code.


Here's how it's done:

var netConnection : NetConnection = new NetConnection();
netConnection.connect( "rtmpe://fmsuri:1111", adminUsername, adminPassword );

var netStream : NetStream = new NetStream( netConnection );
netStream.client = { onLog: handleLog };
netStream.play( "logs/application/appName/instanceName", -1 );

function handleLog ( info : Object ) : void {
     trace( info[ "description" ] );
}


dosnt seem to work with FMS 4 (developer edition), just like all other trace outputs (log files, livelog). only some events seem to be able to drop traces, like onStart and onConnect. others like onPublish seem to be unable to trace out anything. dunno why.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜