//////////////////////////////////////////////////////////////////////////////// // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// package mx.logging.targets { import mx.core.mx_internal; use namespace mx_internal; /** * Provides a logger target that uses the global trace() method to output log messages. * *

To view trace() method output, you must be running the * debugger version of Flash Player or AIR Debug Launcher.

* *

The debugger version of Flash Player and AIR Debug Launcher send output from the trace() method * to the flashlog.txt file. The default location of this file is the same directory as * the mm.cfg file. You can customize the location of this file by using the TraceOutputFileName * property in the mm.cfg file. You must also set TraceOutputFileEnable to 1 in your mm.cfg file.

* * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public class TraceTarget extends LineFormattedTarget { include "../../core/Version.as"; //-------------------------------------------------------------------------- // // Constructor // //-------------------------------------------------------------------------- /** * Constructor. * *

Constructs an instance of a logger target that will send * the log data to the global trace() method. * All output will be directed to flashlog.txt by default.

* * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public function TraceTarget() { super(); } //-------------------------------------------------------------------------- // // Overridden methods // //-------------------------------------------------------------------------- /** * @private * This method outputs the specified message directly to * trace(). * All output will be directed to flashlog.txt by default. * * @param message String containing preprocessed log message which may * include time, date, category, etc. based on property settings, * such as includeDate, includeCategory, etc. */ override mx_internal function internalLog(message:String):void { trace(message); } } }