| パッケージ | org.osmf.logging |
| クラス | public class Log |
| 継承 | Log Object |
| 言語バージョン: | ActionScript 3.0 |
| 製品バージョン: | OSMF 1.0 |
| ランタイムバージョン: | Flash Player 10, AIR 1.5 |
関連する API エレメント
パブリックプロパティ
| プロパティ | 定義元 | ||
|---|---|---|---|
![]() | constructor : Object
指定されたオブジェクトインスタンスのクラスオブジェクトまたはコンストラクター関数への参照です。 | Object | |
| loggerFactory : LoggerFactory [静的]
アプリケーション全体で使用される LoggerFactory です。 | Log | ||
パブリックメソッド
| メソッド | 定義元 | ||
|---|---|---|---|
[静的]
指定されたカテゴリのロガーを返します。 | Log | ||
![]() |
オブジェクトに指定されたプロパティが定義されているかどうかを示します。 | Object | |
![]() |
Object クラスのインスタンスが、パラメーターとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。 | Object | |
![]() |
指定されたプロパティが存在し、列挙できるかどうかを示します。 | Object | |
![]() |
ループ処理に対するダイナミックプロパティの可用性を設定します。 | Object | |
![]() |
ロケール固有の規則に従って書式設定された、このオブジェクトのストリング表現を返します。 | Object | |
![]() |
指定されたオブジェクトのストリング表現を返します。 | Object | |
![]() |
指定されたオブジェクトのプリミティブな値を返します。 | Object | |
プロパティの詳細
loggerFactory | プロパティ |
loggerFactory:LoggerFactory| 言語バージョン: | ActionScript 3.0 |
| 製品バージョン: | OSMF 1.0 |
| ランタイムバージョン: | Flash Player 10, AIR 1.5 |
アプリケーション全体で使用される LoggerFactory です。
実装
public static function get loggerFactory():LoggerFactory public static function set loggerFactory(value:LoggerFactory):voidメソッドの詳細
getLogger | () | メソッド |
例 この例の使用方法
LoggerExample.as
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import org.osmf.elements.VideoElement;
import org.osmf.logging.Logger;
import org.osmf.logging.Log;
import org.osmf.media.MediaPlayerSprite;
import org.osmf.media.URLResource;
public class LoggerSample extends Sprite
{
public function LoggerSample()
{
super();
Log.loggerFactory = new ExampleLoggerFactory();
logger = Log.getLogger("LoggerSample");
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite();
var urlResource:URLResource = new URLResource("rtmp://cp67126.edgefcs.net/ondemand/mediapm/strobe/content/test/SpaceAloneHD_sounas_640_500_short");
var videoElement:VideoElement = new VideoElement(urlResource);
addChild(mediaPlayerSprite);
logger.debug("Ready to play video at " + urlResource.url.toString());
mediaPlayerSprite.media = videoElement;
}
private var logger:Logger;
}
}
ExampleLoggerFactory.as
package
{
import org.osmf.logging.Logger;
import org.osmf.logging.LoggerFactory;
public class ExampleLoggerFactory extends LoggerFactory
{
public function ExampleLoggerFactory()
{
super();
}
override public function getLogger(category:String):Logger
{
return new ExampleLogger(category);
}
}
}
ExampleLogger.as
package
{
import org.osmf.logging.Logger;
public class ExampleLogger extends Logger
{
public function ExampleLogger(category:String)
{
super(category);
}
override public function debug(message:String, ... rest):void
{
trace(message);
}
}
}
Tue Jun 12 2018, 10:34 AM Z
継承されるパブリックプロパティを隠す
継承されるパブリックプロパティを表示