패키지 | org.osmf.logging |
클래스 | public class Logger |
상속 | Logger Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
category : String [읽기 전용]
The category value for the logger. | Logger | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | Logger | ||
Logs a message with a "debug" level. | Logger | ||
Logs a message with a "error" level. | Logger | ||
Logs a message with a "fatal" level. | Logger | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Logs a message with a "info" level. | Logger | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
Logs a message with a "warn" level. | Logger |
category | 속성 |
Logger | () | 생성자 |
debug | () | 메서드 |
public function debug(message:String, ... rest):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Logs a message with a "debug" level.
Debug messages are informational messages that are fine-grained, and intended to be helpful when debugging.
매개 변수
message:String — The information to log. This string can contain special
special marker characters of the form {x}, where x is a zero-based
index that will be replaced with the additional parameters found at
that index if specified.
| |
... rest — Additional parameters that can be subsituted in the
message parameter at each "{x}" location, where x is an zero-based
integer index into the Array of values specified.
|
error | () | 메서드 |
public function error(message:String, ... rest):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Logs a message with a "error" level.
Error messages are intended to capture error events that might still allow the application to continue running.
매개 변수
message:String — The information to log. This string can contain special
special marker characters of the form {x}, where x is a zero-based
index that will be replaced with the additional parameters found at
that index if specified.
| |
... rest — Additional parameters that can be subsituted in the
message parameter at each "{x}" location, where x is an zero-based
integer index into the Array of values specified.
|
fatal | () | 메서드 |
public function fatal(message:String, ... rest):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Logs a message with a "fatal" level.
Fatal messages are intended to capture error events that are likely to lead to application failure.
매개 변수
message:String — The information to log. This string can contain special
special marker characters of the form {x}, where x is a zero-based
index that will be replaced with the additional parameters found at
that index if specified.
| |
... rest — Additional parameters that can be subsituted in the
message parameter at each "{x}" location, where x is an zero-based
integer index into the Array of values specified.
|
info | () | 메서드 |
public function info(message:String, ... rest):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Logs a message with a "info" level.
Info messages are intended to be informational, as opposed to indicating a concern.
매개 변수
message:String — The information to log. This string can contain special
special marker characters of the form {x}, where x is a zero-based
index that will be replaced with the additional parameters found at
that index if specified.
| |
... rest — Additional parameters that can be subsituted in the
message parameter at each "{x}" location, where x is an zero-based
integer index into the Array of values specified.
|
warn | () | 메서드 |
public function warn(message:String, ... rest):void
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Logs a message with a "warn" level.
Warn messages are intended to warn of events that could be harmful to the operation of the application.
매개 변수
message:String — The information to log. This string can contain special
special marker characters of the form {x}, where x is a zero-based
index that will be replaced with the additional parameters found at
that index if specified.
| |
... rest — Additional parameters that can be subsituted in the
message parameter at each "{x}" location, where x is an zero-based
integer index into the Array of values specified.
|
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; } }
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); } } }
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, 03:17 PM Z