`
bzhang
  • 浏览: 253513 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

flex lcds 的日志配置

    博客分类:
  • FLEX
阅读更多

Server-side logging

<!-- googleoff: index--> <!-- END PAGE TITLE --> <!-- BEGIN CONTENT WRAPPER -->
<!-- googleon: index-->

You perform server-side logging for requests to and responses from the server. The following example shows a log message generated by the server:

[LCDS] 05/13/2008 14:27:18.842 [ERROR] [Message.General]

 Exception when invoking service: (none) with message: Flex Message (flex.messaging.messages.AsyncMessageExt)
    clientId = 348190FC-2308-38D7-EB10-57541CC2440A
    correlationId =
    destination = foo
    messageId = E0BFF004-F697-611B-3C79-E38956BAB21B
    timestamp = 1210703238842
    timeToLive = 0
    body = dsafasdasd: asdasd
    hdr(DSEndpoint) = my-rtmp
    hdr(DSId) = 348190D5-130A-1711-B193-25C4415DFCF5
    hdr(DSValidateEndpoint) = true
exception: flex.messaging.MessageException: No destination with id 'chat' is registered with any service.

You can configure the logging mechanism to specify the following information in the message:

  • The type of messages to log, called the log level . The available levels include All , Debug , Error , Info , None , and Warn . For example, you can choose to log Error messages, but not Info messages. For more information, see Setting the logging level .
  • The optional String prefixed to every log message. In this example, the String is [LCDS] . For more information, see Setting logging properties .
  • The display of the date and time of the log message. In this example, the message contains the date and time: 05/13/2008 14:27:18.842 . For more information, see Setting logging properties .
  • The display of the level of the log message. In this example, the message contains the level: [ERROR] . For more information, see Setting logging properties .
  • The display of the category of the log message. The category provides information about the area of LiveCycle Data Services ES that generated the message. In this example, the message contains the level: [Message.General] . For more information, see Setting logging properties .
  • The target of the log messages. By default, log messages are written to System.out. For more information, see Setting the logging target .

Configuring server-side logging

Configure server-side logging in the logging section of the Flex services-config.xml configuration file. After you edit services-config.xml, restart the LiveCycle Data Services ES server.

The following example shows a configuration that sets the logging level to Debug :

<logging>
    <target class="flex.messaging.log.ConsoleTarget" level="Debug"

>
        <properties>
            <prefix>[LCDS]</prefix>
            <includeDate>false</includeDate>
            <includeTime>false</includeTime>
            <includeLevel>false</includeLevel>
            <includeCategory>false</includeCategory>
        </properties>
        <filters>
            <pattern>Endpoint.RTMP</pattern>
        </filters>
    </target>
</logging>

Setting the logging level

The level defines the types of messages written to the log. The following table describes the logging levels:

Logging level

Description

All

Logs all messages.

Debug

Logs debug message. Debug messages indicate internal Flex activities.

Select the Debug logging level to include Debug , Info , Warn , and Error messages in your log files.

Error

Logs error messages. Error messages indicate when a critical service is not available or a situation restricts use of the application.

Info

Logs information messages. Information messages indicate general information to the developer or administrator.

Select the Info logging level to include Info and Error messages in your log files.

None

No messages are logged.

Warn

Logs warning messages. Warning messages indicate that Flex encountered a problem with the application, but the application does not stop running.

Select the Warn logging level to include Warn and Error messages in your log files.

In a production environment, you typically set the logging level to Warn to capture both warnings and error messages. If you prefer to ignore warning messages, set the level to Error to display only error messages.

Setting the logging target

By default, the server writes log messages to System.out. In the class attribute of the target element, you can specify flex.messaging.log.ConsoleTarget (default) to log messages to the standard output, or the flex.messaging.log.ServletLogTarget to log messages to the default logging mechanism for servlets for your application server.

Setting logging properties

The following table describes the logging properties:

Property

Description

includeCategory

Determines whether the log message includes the category. The category provides information about the area of LiveCycle Data Services ES that generated the message. The default value is false .

includeDate

Determines whether the log message includes the date. The default value is false .

includeLevel

Determines whether the log message includes the log level. The categories are Debug, Error, Info, and Warn. Specifies to include the message category in the logging message. The default value is false .

includeTime

Determines whether the log message includes the time. The default value is false .

filters

Specifies a pattern that defines the categories to log. The category of a log message must match the specified pattern to be written to the log. For more information, see Setting a filtering pattern .

prefix

Specifies the String prefixed to log messages. The default value is an empty String.

In the following example, you set the configuration properties to display the category, date, level, time, and set the prefix to [LCDS] :

<logging>
    <target class="flex.messaging.log.ConsoleTarget" level="Debug">
        <properties>
            <prefix>[LCDS]</prefix>


            <includeDate>true</includeDate>


            <includeTime>true</includeTime>


            <includeLevel>true</includeLevel>


            <includeCategory>true</includeCategory>


        </properties>
    </target>
</logging>

Setting a filtering pattern

The <filters> property lets you filter log messages based on the message category. If you omit a setting for the <filters> property, messages for all categories are written to the log.

The following example shows the first line of log messages from different categories:

[LCDS] 05/14/2008 12:52:52.606 [DEBUG] [Endpoint.RTMP]

 Received command: TCCommand 
...
[LCDS] 05/14/2008 12:52:52.606 [DEBUG] [Message.General]

 Before invoke service: message-service
...
[LCDS] 05/14/2008 12:52:52.606 [DEBUG] [Service.Message]

 Sending message: Flex Message ...
[LCDS] 05/14/2008 12:52:52.606 [DEBUG] [Message.Timing]

 After invoke service: message-service; 

To filter messages so only those messages in the Message.General and Endpoint categories appear, set the <filters> property as the following example shows:

<logging>
    <target class="flex.messaging.log.ConsoleTarget" level="Debug">
        <properties>
            <prefix>[LCDS]</prefix>
            <includeDate>false</includeDate>
            <includeTime>false</includeTime>
            <includeLevel>false</includeLevel>
            <includeCategory>false</includeCategory>
        </properties>
        <filters>


            <pattern>Endpoint.*</pattern>


            <pattern>Message.General</pattern>


        </filters>


    </target>
</logging>

Use the wildcard character (*) in the pattern to log messages from more than one category. To see messages for all endpoints, specify a pattern of Endpoint.* . To see messages for only an RTMP endpoint, specify a pattern of Endpoint.RTMP . To see all messages for all categories, specify a pattern of * .

You can use many different patterns as the value of the pattern element, such as the following:

  • Client.*
  • Client.FlexClient
  • Client.MessageClient
  • Configuration
  • Endpoint.*
  • Endpoint.General
  • Endpoint.AMF
  • Endpoint.NIOAMF
  • Endpoint.FlexSession
  • Endpoint.HTTP
  • Endpoint.NIOHTTP
  • Endpoint.RTMP
  • Endpoint.StreamingAMF
  • Endpoint.StreamingHTTP
  • Endpoint.Type
  • Executor
  • Message.*
  • Message.General
  • Message.Command.*

For the complete list of filter patterns, see the services-config.xml file in the install_root /resources/config directory.

<!-- googleoff: index-->
<!-- BEGIN BREADCRUMBS --> <!-- BEGIN BREADCRUMBS -->
 
track back url :http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=services_logging_3.html#345173
分享到:
评论

相关推荐

    Flex LCDS的例子

    5. **LCDS服务配置**:在Java环境中,需要配置LCDS服务,包括在服务器端部署LCDS服务组件,设置数据源和应用程序服务,以及在Flex客户端添加相应的服务引用。 6. **数据绑定和事件处理**:Flex的强项在于其数据绑定...

    Flex + LCDS + Java 入门教程

    2. **LCDS了解**:讲解LCDS的安装和配置,以及如何在Flex项目中引入LCDS库。解释AMF协议的工作原理,以及它如何提高数据传输效率。 3. **Java与Flex的交互**:通过LCDS,学习如何在Java中创建服务,并将其绑定到...

    Flex+LCDS+J2EE系统的实现例子

    2. **LCDS中间层**:通过配置LCDS服务器,将Flex中的RemotingObject与Java服务进行映射。例如,创建一个`StudentService`接口,其中包含添加、删除、更新和查询学生信息的方法。当Flex应用调用这些方法时,LCDS会...

    Lcds配置说明

    2. **连接LCDs**:通过项目配置将Flex应用与LCDs服务器连接起来。 3. **开发功能**:利用LCDs提供的API和服务实现所需的功能,如数据管理和消息传递等。 总之,在配置和使用LCDs的过程中,需要注意环境的准备、遵循...

    Flex与JAVA教程,lcds教程

    8. **调试和监控**:学习如何使用Flex Builder的调试工具,以及如何通过日志和监控工具分析Flex与Java应用的运行状况。 通过深入学习和实践这些知识点,你将能够熟练地运用Flex、Java和LCDs进行企业级应用开发,为...

    Flex+Java+(lcds)源码

    LCDS(LiveCycle Data Services)是Adobe提供的一个组件,它为Flex与Java应用程序之间的数据交换提供了强大的支持。此"Flex+Java+LCDSS"项目源码结合了这些技术,旨在创建一个能够无缝通信的前端和后端系统。 一、...

    lcds.rar_LCDS_LiveCycle Data Servi_LiveCycleDataService_flex_fle

    在实际开发中,`lcds.docx`这样的文档可能包含LCDS的配置指南、API参考、最佳实践或者示例代码,帮助开发者更好地理解和使用LCDS。通过深入学习和应用LCDS,开发者可以构建出响应迅速、功能丰富的Flex企业应用,提升...

    整合Flex和Java--配置篇

    3. **AMF配置**:为了实现更高效的通信,可以使用BlazeDS或LCDS(LiveCycle Data Services)等中间件,它们支持AMF协议,能提供二进制数据传输,提高性能。在Flex项目中配置相应的AMF通道,并在Java服务器端添加相应...

    springmvc与Flex集成示例

    3. **配置AMF通道**:在Flex项目中,配置BlazeDS或LCDS(Adobe LiveCycle Data Services)来开启AMF通道,并指定到Spring MVC的URL映射。 4. **编写Flex客户端代码**:在Flex界面中,使用HTTPService或RemoteObject...

    java flex jar包

    例如,使用Flex的`Trace`命令,Java的日志框架如Log4j,以及BlazeDS/LCDS的调试设置。 8. **性能优化**:当处理大量数据或高并发请求时,优化AMF通信至关重要。这可能包括调整服务器端的AMF配置、数据分页、异步...

    Spring-Flex架构分析

    这是一个日志配置文件,通常用于定义日志记录级别、输出目的地和格式。在Spring-Flex项目中,日志管理是关键,因为它帮助开发者跟踪程序运行状态,排查错误。Log4j是一个广泛使用的日志框架,它允许灵活的日志配置,...

    Flex如何连接数据库,通信的详细的教程

    利用Flex的调试工具和日志记录,可以定位并解决问题。对于AMF通信问题,检查服务器端和客户端的配置是否一致,数据序列化是否正确。 8. **异常处理** 对于可能出现的异常情况,如数据库连接失败、查询错误等,需在...

    flex 3.0 sample

    6. **错误处理和调试**:学习在Flex和LCDS环境中如何有效地处理错误,进行调试和日志记录,确保应用的稳定性和可靠性。 7. **性能优化**:探讨如何优化Flex应用的性能,减少网络传输开销,提升用户交互体验。 通过...

    spring整合Flex

    2. ** BlazeDS / LCDS**: Spring与Flex之间的通信通常通过BlazeDS或LiveCycle Data Services (LCDS)实现,它们是Adobe提供的服务器端组件,支持AMF(Action Message Format)协议,使得数据能高效地在Flex客户端和...

    flex的第一步,安装、配置、与tomcat的挂接

    确认 FlexBuilder 或 LCDS 已正确配置,并能识别 JOTM。 - **检查 DataService 配置**。在 Flex 应用程序的配置中,确保正确设置了事务管理器。 - **验证事务管理器类名**。确保使用的事务管理器类名正确无误。 ...

    spring+mybatis+flex4框架组合,适合初学者

    最后,学习Flex4的ActionScript编程和Flex组件使用,以及如何通过 BlazeDS 或 LCDS 实现与Spring应用的通信。在整个过程中,熟悉MVC设计模式和RESTful API设计原则也是非常重要的。 综上所述,Spring+MyBatis+Flex4...

    activiti+flex项目搭建

    配置BlazeDS或LCDS作为中间层,以处理Flex与后端服务的通信。 7. **实现服务调用**:在Flex应用中,你可以通过创建远程对象(RemoteObject)来调用Activiti的服务,如启动流程实例、查询任务、完成任务等。这需要在...

    flex 上传excel 导入数据库

    在项目结构中,`flex_src`和`src`可能包含了Flex项目的源代码,`.flexProperties`和`.project`是Flex项目配置文件,`.classpath`用于管理项目依赖,`flex_libs`可能是放置第三方库的地方,`html-template`则可能包含...

    flex 与Java通讯

    3. 定义AMF通道:配置BlazeDS/LCDS,设置AMF通道,指定Java服务暴露给Flex客户端。 4. Flex客户端开发:在Flex应用中创建RemoteObject或HTTPService,指定Java服务的URL和方法名。 5. 数据交换:Flex客户端调用...

    JSP嵌入一个或多个Flex

    JSP的脚本let和表达式可以用来动态地生成Flex模块的配置信息,比如传递参数到Flex模块,或者根据服务器端的状态决定加载哪个模块。 6. **Servlets和Filter**: 在JSP和Flex通信过程中,Servlets可以作为数据处理...

Global site tag (gtag.js) - Google Analytics