论坛首页 编程语言技术论坛

blazeds 自带的日志记录功能

浏览 2954 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-02-09  

 在mxml添加<mx:TraceTarget level="1"/>,level代表日志等级,就是all,debug,info,error等。。。。

 在配置文件中打开:

<logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Debug">
            <properties>
                <prefix>[Flex] </prefix>
                <includeDate>true</includeDate>
                <includeTime>true</includeTime>
                <includeLevel>true</includeLevel>
                <includeCategory>true</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

 

tomcat console:

[Flex] 02/09/2011 16:38:38.812 [WARN] [Configuration] HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.
[Flex] 02/09/2011 16:38:38.890 [DEBUG] [Endpoint.FlexSession] FlexSession created with id '7FAD3A28CFC179E2783613C195B0B985' for an Http-based client connection.
[Flex] 02/09/2011 16:38:38.906 [INFO] [Endpoint.General] Channel endpoint my-amf received request.
[Flex] 02/09/2011 16:38:39.015 [DEBUG] [Endpoint.AMF] Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/1)
    (Array #0)
      [0] = (Typed Object #0 'flex.messaging.messages.CommandMessage')
        operation = 5
        correlationId = ""
        messageId = "EB7AB2B6-EFA3-6054-8930-09927DCCFAB0"
        timestamp = 0
        headers = (Object #1)
          DSId = "nil"
          DSMessagingVersion = 1
        destination = ""
        body = (Object #2)
        clientId = null
        timeToLive = 0

[Flex] 02/09/2011 16:38:39.156 [DEBUG] [Endpoint.AMF] Serializing AMF/HTTP response
Version: 3
  (Message #0 targetURI=/1/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
      (Object #1)
        DSMPIO = (Typed Object #2 'flex.messaging.messages.MessagePerformanceInfo')
          serverPreAdapterTime = 0.0
          serverPreAdapterExternalTime = 0.0
          infoType = null
          sendTime = 1.29724071914E12
          recordMessageTimes = false
          serverPrePushTime = 0.0
          pushedFlag = false
          serverPostAdapterExternalTime = 0.0
          receiveTime = 0.0
          messageSize = 0.0
          overheadTime = 0.0
          recordMessageSizes = false
          serverPostAdapterTime = 0.0
        DSMessagingVersion = 1.0
        DSId = "655EA75C-C708-C158-A04B-EEACB497D065"
1.297240719031E12
(Byte Array #3, Length 16)
(Byte Array #4, Length 16)
(Byte Array #5, Length 16)

[Flex] 02/09/2011 16:38:39.203 [INFO] [Endpoint.General] Channel endpoint my-amf received request.
[Flex] 02/09/2011 16:38:39.218 [DEBUG] [Endpoint.AMF] Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/2)
    (Array #0)
      [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
        source = null
        operation = "sayHello"
        messageId = "E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB"
        timestamp = 0
        headers = (Object #1)
          DSId = "655EA75C-C708-C158-A04B-EEACB497D065"
          DSEndpoint = "my-amf"
        destination = "FirstJavaClassRemoteObject"
        body = (Array #2)
          [0] = "hi~你好"
        clientId = null
        timeToLive = 0

[Flex] 02/09/2011 16:38:39.218 [DEBUG] [Service.Remoting] Adapter 'java-object' called 'com.test.FirstJavaClass.sayHello(java.util.Arrays$ArrayList (Collection size:1)
  [0] = hi~你好
)'
[Flex] 02/09/2011 16:38:39.218 [DEBUG] [Service.Remoting] Result: '你说的是:hi~你好'
[Flex] 02/09/2011 16:38:39.218 [DEBUG] [Endpoint.AMF] Serializing AMF/HTTP response
Version: 3
  (Message #0 targetURI=/2/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
      "你说的是:hi~你好"
(Object #1)
        DSMPIO = (Typed Object #2 'flex.messaging.messages.MessagePerformanceInfo')
          serverPreAdapterTime = 0.0
          serverPreAdapterExternalTime = 0.0
          infoType = null
          sendTime = 1.297240719218E12
          recordMessageTimes = false
          serverPrePushTime = 0.0
          pushedFlag = false
          serverPostAdapterExternalTime = 0.0
          receiveTime = 0.0
          messageSize = 0.0
          overheadTime = 0.0
          recordMessageSizes = false
          serverPostAdapterTime = 0.0
1.297240719218E12
(Byte Array #3, Length 16)
(Byte Array #4, Length 16)
(Byte Array #5, Length 16)

  flex console:

0AE5DD11-6F38-C4D2-9B38-09927560A495' producer set destination to 'FirstJavaClassRemoteObject'.
'0AE5DD11-6F38-C4D2-9B38-09927560A495' producer sending message 'E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB'
'my-amf' channel endpoint set to http://localhost:8080/flex_blazeds3/messagebroker/amf
'my-amf' channel settings are:
<channel id="my-amf" type="mx.messaging.channels.AMFChannel">
  <endpoint uri="http://{server.name}:{server.port}/flex_blazeds3/messagebroker/amf"/>
  <properties/>
</channel>
'my-amf' pinging endpoint.
'my-amf' channel is connected.
'my-amf' channel sending message:
(mx.messaging.messages::RemotingMessage)#0
  body = (Array)#1
    [0] "hi~你好"
  clientId = (null)
  destination = "FirstJavaClassRemoteObject"
  headers = (Object)#2
  messageId = "E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB"
  operation = "sayHello"
  source = (null)
  timestamp = 0
  timeToLive = 0
'0AE5DD11-6F38-C4D2-9B38-09927560A495' producer connected.
'0AE5DD11-6F38-C4D2-9B38-09927560A495' producer acknowledge of 'E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB'.

 

 

论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics