Skip to content

fix(server): Output generated root password in info level#2216

Closed
vax-r wants to merge 1 commit intoapache:masterfrom
vax-r:fix_trace
Closed

fix(server): Output generated root password in info level#2216
vax-r wants to merge 1 commit intoapache:masterfrom
vax-r:fix_trace

Conversation

@vax-r
Copy link
Copy Markdown
Contributor

@vax-r vax-r commented Sep 28, 2025

Summary

Fixes commit 4323c4f450dcbf14ae025bbac06d0a20fcdbe8ed, output the generate password for root user in info level, instead of stdout.

Test

Before the change

$ cargo r --bin iggy-server
...
2025-09-28T03:00:09.902914Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::info: System version 0.5.0 is up to date.
2025-09-28T03:00:09.902994Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: Loading users...
2025-09-28T03:00:09.903016Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: No users found, creating the root user...
2025-09-28T03:00:09.903052Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: Using the default root user credentials...
Generated root user password: <generated_password>

After the change

$ cargo r --bin iggy-server
...
2025-09-28T03:01:26.443629Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: No users found, creating the root user...
2025-09-28T03:01:26.443667Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: Using the default root user credentials...
2025-09-28T03:01:26.443873Z  INFO ThreadId(01) trace_system_init: server::streaming::systems::users: Generated root user password: egoO2DVtX4VwxiRb2Y5UcCkh

Fixes commit 4323c4f, output the
generate password for root user in info level, instead of stdout.

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
Copy link
Copy Markdown
Contributor

@spetz spetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The println is used not to send the output along with the rest of the logs when using info! and other macros.

@vax-r vax-r closed this Sep 28, 2025
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

Successfully merging this pull request may close these issues.

2 participants