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

transport logging module #1363

Closed
0pcom opened this issue Sep 17, 2022 · 0 comments
Closed

transport logging module #1363

0pcom opened this issue Sep 17, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@0pcom
Copy link
Collaborator

0pcom commented Sep 17, 2022

  • logging module can rely on the already implemented transport level logging as found here

  • at every interval (can be hardcoded for now), the transport module will iterate over the open transports and add a new line to the log file for the given day

    • a new line will be added with the following information that will be aggregated for all transports open
      • timestamp of the addition of the line
      • number of bytes received since last write
      • number of bytes sent since last write
  • at transport closure, a hook will be triggered to write the bytes received and sent over this transport if its larger than 0 bytes received or 0 bytes sent

  • at visor shutdown, a hook will be triggered to start log writing routine

  • log files will be structured the following way

# structure of the log directory with single day log files named after the day of their creation
.
├── local
│   ├── logs
│   │   └── 2022-09-04.csv
│   │   └── 2022-09-03.csv
│   │   └── 2022-09-02.csv
│   ├── privacy.json
│   ├── logs.json
│   ├── system.json
  • if a log file is not found for a given day, it will be created by the logging code in the transport module
  • the log files will be encoded as a simple csv format with the following header line
# timestamp as unix timestamp
timestamp, bytes_received, bytes_sent
  • transport module will have built in routine that triggers cleanup of existing log file according to specified log rotation interval
    • cleanup all log files where age of the file is older than specified log rotation interval
@0pcom 0pcom added the enhancement New feature or request label Sep 25, 2022
@ersonp ersonp self-assigned this Sep 30, 2022
This was referenced Oct 7, 2022
@ersonp ersonp closed this as completed Oct 20, 2022
@0pcom 0pcom added this to the Milestone 8 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants