flex 日志 mm.cfg

Flex提供了类似于JAVA中的日志功能(首先得安装flashplayer_10_ax_debug),具体操作如下所示:

1、提供一个配置文件mm.cfg,类似于log4j.properties文件,不过该文件的所在的目录跟log4j有所不同,mm.cfg文件所在的目录跟操作系统有关:

 

  

Macintosh OS X

/Library/Application Support/Macromedia

Windows 95/98/ME    

%HOMEDRIVE%/%HOMEPATH%

Windows 2000/XP

C:/Documents and Settings/username

Windows Vista/7

C:/Users/username

Linux

/home/username

 

2、在mm.cfg文件中配置如下内容:ErrorReportingEnable=1

3、依然根据操作系统的不同,到相应的目录查看记录的日志

 

  

Windows 95/98/ME/2000/XP  

C:/Documents and Settings/username/Application Data/Macromedia/Flash Player/Logs

Windows Vista/7

C:/Users/username/AppData/Roaming/Macromedia/Flash Player/Logs

Macintosh OS X

/Users/username/Library/Preferences/Macromedia/Flash Player/Logs/

Linux

/home/username/.macromedia/Flash_Player/Logs/

 

 

最后,附上可以在mm.cfg文件中配置的内容:

 

ErrorReportingEnable

Enables the logging of error messages.

Set the ErrorReportingEnable property to 1 to enable the debugger version of Flash Player to write error messages to the log file. To disable logging of error messages, set the ErrorReportingEnable property to 0.

The default value is 0.

MaxWarnings

Sets the number of warnings to log before stopping.

The default value of the MaxWarnings property is 100. After 100 messages, the debugger version of Flash Player writes a message to the file stating that further error messages will be suppressed.

Set the MaxWarnings property to override the default message limit. For example, you can set it to 500 to capture 500 error messages.

Set the MaxWarnings property to 0 to remove the limit so that all error messages are recorded.

TraceOutputFileEnable

Enables trace logging.

Set TraceOutputFileEnable to 1 to enable the debugger version of Flash Player to write trace messages to the log file. Disable trace logging by setting the TraceOutputFileEnable property to 0.

The default value is 0.

TraceOutputFileName

Note: Beginning with the Flash Player 9 Update, Flash Player ignores the TraceOutputFileName property and stores the flashlog.txt file in a hard-coded location based on operating system. For more information, see Log file location.

Sets the location of the log file. By default, the debugger version of Flash Player writes error messages to a file named flashlog.txt, located in the same directory in which the mm.cfg file is located.

Set TraceOutputFileName to override the default name and location of the log file by specifying a new location and name in the following form: On Macintosh OS X, you should use colons to separate directories in the TraceOutputFileName path rather than slashes.

TraceOutputFileName=<fully qualified path/filename>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值