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

Fix: clients output in JSON should not include logging #919

Conversation

josecelano
Copy link
Member

The console clients' output should not include logging info when the output is JSON. IT fixes this behavior:

Command:

$ cargo run --bin udp_tracker_client announce 144.126.245.19:6969 9c38422213e30bff212b30c360d26f9a02136422 
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.09s
     Running `target/debug/udp_tracker_client announce '144.126.245.19:6969' 9c38422213e30bff212b30c360d26f9a02136422`

Output:

```s
2024-06-26T07:46:10.051490Z  INFO torrust_tracker::console::clients::udp::app: logging initialized.
{
  "AnnounceIpv4": {
    "transaction_id": -888840697,
    "announce_interval": 300,
    "leechers": 0,
    "seeders": 1,
    "peers": []
  }
}

The line 2024-06-26T07:46:10.051490Z INFO torrust_tracker::console::clients::udp::app: logging initialized. or any other lines should not be included. I will open a discussion about how to deal with logging in console clients.

@josecelano josecelano self-assigned this Jun 26, 2024
@josecelano josecelano added the Bug Incorrect Behavior label Jun 26, 2024
@josecelano josecelano added this to the v3.0.0 milestone Jun 26, 2024
@josecelano josecelano linked an issue Jun 26, 2024 that may be closed by this pull request
@josecelano
Copy link
Member Author

I've opened a discussion about implementing login in the console clients: #920

@josecelano josecelano requested a review from da2ce7 June 26, 2024 16:14
@josecelano
Copy link
Member Author

ACK 2518c54

@josecelano josecelano merged commit bb8b2ad into torrust:develop Jun 26, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect Behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove log output from UDP tracker client
1 participant