logging

command
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 5 Imported by: 0

README

Traffic logging

This example shows how to log the JSON traffic to a file or how to implement the TrafficLogger interface and log traffic to stdout.

Sent: {"jsonrpc":"2.0","delta":false,"method":"CreateSessionApp","handle":-1,"id":1,"params":[]}
Received: {"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"SESSION_CREATED"}}
Received: {"jsonrpc":"2.0","id":1,"result":{"qReturn":{"qType":"Doc","qHandle":1},"qSessionAppId":"SessionApp_9ff821c1-28ca-4b23-9ad5-1f2e6606f475"},"change":[1]}
Sent: {"jsonrpc":"2.0","delta":false,"method":"SetScript","handle":1,"id":2,"params":["\nTempTable:\nLoad\nRecNo() as Field1,\nRand() as Field2,\nRand() as Field3\nAutoGenerate 100\n"]}
Received: {"jsonrpc":"2.0","id":2,"result":{}}
Sent: {"jsonrpc":"2.0","delta":false,"method":"DoReload","handle":1,"id":3,"params":[0,false,false]}

Runnable code

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL