LiveCycle® Data Services Developer's Guide |
|||
| Administering Data Services Applications > Logging > Web-tier logging | |||
The web-tier compiler is used by the Flex web application that runs on a web application server. The Flex web application provides logging for the following types of messages:
Startup messages from the FlexMxmlServlet These messages are primarily informational in nature. For example, when the servlet starts, you will get information about your license version. For more information, see Configuring web application logging.
Web-tier compiler messages When the server running LiveCycle Data Services responds to a request for an MXML file, it opens the web-tier compiler. The compiler can write error and warning messages to the wrapper and the web application logging mechanism. For more information, see Configuring web-tier compiler logging.
JRun application server messages If you are using the integrated JRun application server with LiveCycle Data Services or Flex Builder, you can configure the JRun server logging mechanism by using the flex_install_dir/jrun4/servers/default/SERVER-INF/jrun.xml file. For more information, see Configuring JRun logging.
By default, the Flex web application logs informational messages about the FlexMxmlServlet to the console and to a log file. These messages include information about the current license and file access.
When the server starts up, the FlexMxmlServlet writes a message regarding the license service. In addition, when a client makes a bad file request to the FlexMxmlServlet, the servlet writes a "File Not Found" error message to the log.
If you use the integrated JRun Java application server, you can view additional servlet initialization log entries in the jrun_install_dir/logs/default-event.log file. For more information, see Configuring JRun logging.
You configure web-tier logging by using the flex-webtier-config.xml file in the flex_root/WEB-INF/flex directory.
The default location of the log file is flex_root/WEB-INF/flex/logs/flex.log. You can set the name and location, size, and the number of backup files to keep in the flex-webtier-config.xml file.
The following example shows the default logging settings in the flex-config.xml file:
<logging>
<level>info</level>
<console>
<enable>true</enable>
</console>
<file>
<enable>true</enable>
<file-name>/WEB-INF/flex/logs/flex.log</file-name>
<maximum-size>200KB</maximum-size>
<maximum-backups>3</maximum-backups>
</file>
</logging>
The value of <file-name> must be an absolute path or it must start with a forward slash (/). If the location is invalid, Flex logs an error to the console and the application continues without file logging. On UNIX, if you start the path with a forward slash and one of the parent directories (other than root '/') exists, the path is absolute. Otherwise, the path is relative to the application.
You can also set the log level for the web application logger by using the level property. This setting applies only to the servlet messages and not to the compiler messages.
To disable the web application's file logging, set the value of the enable property in the file block to false. To disable the web application's console logging, set the value of the <console> property to false, as the following example shows:
<logging>
<console>
<enable>false</enable>
</console>
...
</logging>
The web application logger can also send compiler error and warning messages to the web application server's logging mechanism. For more information, see Configuring web-tier compiler logging.
For more information about the web-tier compiler, see Using the web-tier application compiler.
A request for a *.mxml file to the web application server that is running Flex triggers the web-tier compiler to compile a SWF file. When this compiler runs, it can produce warning and error log messages just as the command-line compiler can. However, you can have the log messages sent to the web application server's logging mechanism by using the log-compiler-errors property in the flex-webtier-config.xml file.
The flex-webtier-config.xml file is located in the flex_root/WEB-INF/flex directory.
The web application logger does not log run-time messages, regardless of their severity. This logger only logs server-side compiler messages.
To log compiler errors to the log file or console, you must set <production-mode> to false. If production mode is enabled, Flex does not generate log entries for compiler errors.
To write web-tier compiler warning and error messages to the web application server logging mechanism, set the value of the log-compiler-errors property to true, as the following example shows:
<debugging>
<log-compiler-errors>true</log-compiler-errors>
</debugging>
The web-tier compiler logging messages are controlled by the Flex web application logging mechanism. For example, the log file is limited to the size and number of backups specified in the logging block of the flex-webtier-config.xml file. For more information, see Configuring web application logging.
You use the level property in the logging block to set the level of log messages to write to the log file by using the info and error levels. Do not confuse these messages with the client-side error messages that share the same log-level names that are written to the trace logs. These messages apply only to the compiler's results, which are never written to logs on the client side.
When you set the production-mode property to true, the Flex application does not log any compiler messages, regardless of the value of the log-compiler-errors property.
For more information about the web-tier compiler, see Using the web-tier application compiler.
LiveCycle Data Services ES 2.5
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/logging_8.html