Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Logging #15

Closed
stvhwrd opened this issue Feb 9, 2019 · 3 comments
Closed

Enable Logging #15

stvhwrd opened this issue Feb 9, 2019 · 3 comments

Comments

@stvhwrd
Copy link
Owner

stvhwrd commented Feb 9, 2019

HTTP Server will contribute four logs:

DebugType

Debugging messages contain all the information of user commands, in
addition to an optional debug message

  • "timestamp": int // UNIX timestamp
  • "server": string // name of server eg. "Transaction Server"
  • "transactionNum": int // enumeration of transaction
  • "command": string // one of the known commands ("BUY", "SELL" etc)
  • "username": string // optional alphanumeric username
  • "stockSymbol": string // optional three-char alphanumeric stock symbol ("NWC", "BTK")
  • "filename": string // optional name of file to be written to
  • "funds": decimal // optional dollars and cents (eg 24.99)
  • "debugMessage": string // optional debug message or description

ErrorEventType

Error messages contain all the information of user commands, in
addition to an optional error message

  • "timestamp": int // UNIX timestamp
  • "server": string // name of server eg. "Transaction Server"
  • "transactionNum": int // enumeration of transaction
  • "command": string // one of the known commands ("BUY", "SELL" etc)
  • "username": string // optional alphanumeric username
  • "stockSymbol": string // optional three-char alphanumeric stock symbol ("NWC", "BTK")
  • "filename": string // optional name of file to be written to
  • "funds": decimal // optional dollars and cents (eg 24.99)
  • "errorMessage": string // optional error message or description

SystemEventType

System events can be current user commands, interserver communications,
or the execution of previously set triggers

  • "timestamp": int // UNIX timestamp
  • "server": string // name of server eg. "Transaction Server"
  • "transactionNum": int // enumeration of transaction
  • "command": string // one of the known commands ("BUY", "SELL" etc)
  • "username": string // optional alphanumeric username
  • "stockSymbol": string // optional three-char alphanumeric stock symbol ("NWC", "BTK")
  • "filename": string // optional name of file to be written to
  • "funds": decimal // optional dollars and cents (eg 24.99)

UserCommandType

User commands come from the user command files or from manual entries
in UI web forms

  • "timestamp": int // UNIX timestamp
  • "server": string // name of server eg. "Transaction Server"
  • "transactionNum": int // enumeration of transaction
  • "command": string // one of the known commands ("BUY", "SELL" etc)
  • "username": string // optional alphanumeric username
  • "stockSymbol": string // optional three-char alphanumeric stock symbol ("NWC", "BTK")
  • "filename": string // optional name of file to be written to
  • "funds": decimal // optional dollars and cents (eg 24.99)
@stvhwrd
Copy link
Owner Author

stvhwrd commented Feb 10, 2019

Since every log is tied to a transaction number and a command, should probably maintain one global appropriately scoped commonlib.LogCommandParameters instance per request

@qqqstuv
Copy link
Contributor

qqqstuv commented Feb 10, 2019

Sorry I'm a bit unsured why should we keep track of LogCommandParameters per request?
Isn't the webserver done with LogCommandParameters after it has sent off a message to logging server?
Also afaik the workload generator currently does not send the transactionNumber to webserver. I need to enable that at some point, right?

@stvhwrd
Copy link
Owner Author

stvhwrd commented Feb 10, 2019

No need to enable that - the HTTP server now assigns transactionNum as the requests come in. We'll need to modify the parameters downstream to ensure that transactionNum propagates

@stvhwrd stvhwrd closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants