Packageorg.as3commons.logging.util
Classpublic final class LogMessageFormatter
InheritanceLogMessageFormatter Inheritance Object

Since : 2.0

A Formatter that formats a message string using a pattern.
FieldDescription
{date}The date in the format YYYY/MM/DD
{dateUTC}The UTC date in the format YYYY/MM/DD
{gmt}The time offset of the statement to the Greenwich mean time in the format GMT+9999
{logLevel}The level of the log statement (example: DEBUG )
{logTime}The UTC time in the format HH:MM:SS.0MS
{message}The message of the logger
{message_dqt}The message of the logger, double quote escaped.
{name}The name of the logger
{time}The time in the format H:M:S.MS
{timeUTC}The UTC time in the format H:M:S.MS
{shortName}The short name of the logger
{shortSWF}The SWF file name
{swf}The full SWF path
{person}The Person that wrote this statement
{atPerson}The Person that wrote this statement with the 'at' prefix

See also

org.as3commons.logging.setup.target.IFormattingLogTarget


Public Methods
 MethodDefined By
  
LogMessageFormatter(format:String)
Constructs a new LogMessageFormatter instance.
LogMessageFormatter
  
format(name:String, shortName:String, level:int, timeMs:Number, message:String, params:Array, person:String):String
Returns a string with the parameters replaced.
LogMessageFormatter
Constructor Detail
LogMessageFormatter()Constructor
public function LogMessageFormatter(format:String)

Constructs a new LogMessageFormatter instance.

Parameters
format:String — Format pattern used to format a log statement
Method Detail
format()method
public function format(name:String, shortName:String, level:int, timeMs:Number, message:String, params:Array, person:String):String

Returns a string with the parameters replaced.

Parameters

name:String — Name of the logger that initiated that log statement.
 
shortName:String — Short name of the logger that initiated that log statement.
 
level:int — Level of which the output happened.
 
timeMs:Number — Time in ms since 1970, passed to the log target.
 
message:String — Message that should be logged.
 
params:Array — Parameter that should be filled in the message.
 
person:String — Information about the person that filed this log statement.

Returns
String

See also

org.as3commons.logging.Logger