3d 记录和重放RealityServer Web服务请求

3d 记录和重放RealityServer Web服务请求,3d,json-rpc,realityserver,3d,Json Rpc,Realityserver,我正在尝试诊断RealityServer应用程序的问题,但是使用我的应用程序用户界面手动重现问题变得非常耗时 有没有办法记录和重播RealityServer接收到的JSON-RPC Web服务命令,这样我就可以在不使用应用程序用户界面的情况下重现问题?RealityServer提供了两种用于监视请求的工具。您可能对本例感兴趣的主要插件是Commandlog插件,它随RealityServer一起提供,但在默认情况下被禁用。您需要编辑realityserver.conf文件并取消对相关行的注释。以

我正在尝试诊断RealityServer应用程序的问题,但是使用我的应用程序用户界面手动重现问题变得非常耗时


有没有办法记录和重播RealityServer接收到的JSON-RPC Web服务命令,这样我就可以在不使用应用程序用户界面的情况下重现问题?

RealityServer提供了两种用于监视请求的工具。您可能对本例感兴趣的主要插件是Commandlog插件,它随RealityServer一起提供,但在默认情况下被禁用。您需要编辑realityserver.conf文件并取消对相关行的注释。以下是文件的相关部分:

# uncomment below to enable the command logging state handler.
# this will record every JSON-RPC command received during a RealityServer
# session into a python script which can later be replayed to re-run the
# session. this can be useful for tracking down bugs.
# note that when enabled this will overwrite the replay.py file every
# time RealityServer starts so you must ensure you make a copy of any
# file you wish to keep. The file is created in the working directory,
# not the RealityServer root.
<url .*>
state Commandlog_state_handler
</url>
然后将记录的命令序列发送到正在运行的RealityServer。命令将与记录的命令完全相同,但不包括计时,因此将尽可能快地播放。如果您的问题对时间敏感,则可能需要使用其他方法来捕获和重放数据

注意:RealityServer在启动时会覆盖replay.py文件,因此如果希望在两次启动之间保留该文件,则必须将其复制到其他名称。如果使用脚本自动重新启动RealityServer,则需要注意包含一个复制文件的步骤

如果您希望记录所有HTTP请求,而不仅仅是JSON-RPC请求,还可以为此添加以下realityserver.conf选项:

http_log access.log

这将以Apache日志格式记录所有请求,这对于支持该格式的工具非常有用。您可以找到RealityServer配置选项的完整列表。

用您选择的任何编程语言为其编写自己的程序,或试用。Fiddler可以录制HTTP会话并重播它们

http_log access.log