| Pacchetto | org.osmf.logging |
| Classe | public class Logger |
| Ereditarietà | Logger Object |
| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | Flash Player 10, AIR 1.5 |
Elementi API correlati
| Proprietà | Definito da | ||
|---|---|---|---|
| category : String [sola lettura]
The category value for the logger. | Logger | ||
![]() | constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | |
| Metodo | Definito da | ||
|---|---|---|---|
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 | ||
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
Logs a message with a "info" level. | Logger | ||
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
Logs a message with a "warn" level. | Logger | ||
category | proprietà |
Logger | () | Funzione di costruzione |
debug | () | metodo |
public function debug(message:String, ... rest):void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | 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.
Parametri
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 | () | metodo |
public function error(message:String, ... rest):void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | 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.
Parametri
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 | () | metodo |
public function fatal(message:String, ... rest):void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | 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.
Parametri
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 | () | metodo |
public function info(message:String, ... rest):void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | 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.
Parametri
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 | () | metodo |
public function warn(message:String, ... rest):void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | 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.
Parametri
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, 02:44 PM Z
Nascondi proprietà pubbliche ereditate
Mostra proprietà pubbliche ereditate