Skip to content

✨ v3: Change startup message#2041

Merged
ReneWerner87 merged 9 commits intogofiber:v3-betafrom
gozeloglu:v3-revamp-startup-message
Sep 15, 2022
Merged

✨ v3: Change startup message#2041
ReneWerner87 merged 9 commits intogofiber:v3-betafrom
gozeloglu:v3-revamp-startup-message

Conversation

@gozeloglu
Copy link
Contributor

Signed-off-by: Gökhan Özeloğlu gokhan.ozeloglu@deliveryhero.com

Description

I changed the startup message. Figlet text is added.

Fixes #2032

* Fiber figlet text is added to beginning of the startup message.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@efectn
Copy link
Member

efectn commented Aug 24, 2022

What do you think about the location of information messages?

@efectn efectn linked an issue Aug 24, 2022 that may be closed by this pull request
3 tasks
@efectn efectn added this to the v3 milestone Aug 24, 2022
@gozeloglu
Copy link
Contributor Author

What do you think about the location of information messages?

I think they can be under the Fiber text.

@efectn
Copy link
Member

efectn commented Aug 24, 2022

I think they can be under the Fiber text.

Maybe they can be written like => server started on http://127.0.0.1:3000 or https://raw.githubusercontent.com/rs/zerolog/master/pretty.png as similar logging messages. What do you mean?

@gozeloglu
Copy link
Contributor Author

I think they can be under the Fiber text.

Maybe they can be written like => server started on http://127.0.0.1:3000 or https://raw.githubusercontent.com/rs/zerolog/master/pretty.png as similar logging messages. What do you mean?

Both options are cool. I am going to try to implement the second option, logging one.

* Table is removed. Logs are added.

* Test cases refactored.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@gozeloglu
Copy link
Contributor Author

I didn't add color. I can use fatih/color or any other package. What do you think, @efectn?

@efectn
Copy link
Member

efectn commented Aug 24, 2022

I didn't add color. I can use fatih/color or any other package. What do you think, @efectn?

You can use colors like old style. I think we don't need extra dep

* Used custom color codes to make logs colorful.

* Added a new test case.

* Fixed broken test case after changes.

* Added some color codes as a variable.

* Handled Windows case with init() function. Color codes are set empty string.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@gozeloglu
Copy link
Contributor Author

I didn't add color. I can use fatih/color or any other package. What do you think, @efectn?

You can use colors like old style. I think we don't need extra dep

I added colors to log messages. You can check an example output below. What do you think?

image

Copy link
Member

@efectn efectn left a comment

Choose a reason for hiding this comment

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

maybe we can write version right of the Fiber ASCII art

Copy link
Member

@efectn efectn left a comment

Choose a reason for hiding this comment

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

I think server started on message can be first or last message. Also what about adding a separator between ASCII and info messages like Echo v4.

@gozeloglu
Copy link
Contributor Author

maybe we can write version right of the Fiber ASCII art

    _______ __                      _____  ____   ____        __         __       
   / ____(_) /_  ___  _____   _   _|__  / / __ \ / __ \      / /_  ___  / /_____ _
  / /_  / / __ \/ _ \/ ___/  | | / //_ < / / / // / / /_____/ __ \/ _ \/ __/ __ `/
 / __/ / / /_/ /  __/ /      | |/ /__/ // /_/ // /_/ /_____/ /_/ /  __/ /_/ /_/ / 
/_/   /_/_.___/\___/_/       |___/____(_)____(_)____/     /_.___/\___/\__/\__,_/  
                                                                                  

It is like this. It can be confusing, but not a big deal.

@gozeloglu
Copy link
Contributor Author

I think server started on message can be first or last message. Also what about adding a separator between ASCII and info messages like Echo v4.

What do you mean by "separator between ASCII and info messages"? I don't know the Echo version. I just saw the example here. Do you mean ---------------- between fancy text and logs?

@efectn
Copy link
Member

efectn commented Aug 24, 2022

maybe we can write version right of the Fiber ASCII art

    _______ __                      _____  ____   ____        __         __       
   / ____(_) /_  ___  _____   _   _|__  / / __ \ / __ \      / /_  ___  / /_____ _
  / /_  / / __ \/ _ \/ ___/  | | / //_ < / / / // / / /_____/ __ \/ _ \/ __/ __ `/
 / __/ / / /_/ /  __/ /      | |/ /__/ // /_/ // /_/ /_____/ /_/ /  __/ /_/ /_/ / 
/_/   /_/_.___/\___/_/       |___/____(_)____(_)____/     /_.___/\___/\__/\__,_/  
                                                                                  

It is like this. It can be confusing, but not a big deal.

No. As a text, it's very big if we do it ASCII art.

I think server started on message can be first or last message. Also what about adding a separator between ASCII and info messages like Echo v4.

What do you mean by "separator between ASCII and info messages"? I don't know the Echo version. I just saw the example here. Do you mean ---------------- between fancy text and logs?

Yes

* Color codes are taken from config.

* Version is added to figlet text.

* Reordered "server started on" message.

* Test cases are refactored.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@gozeloglu
Copy link
Contributor Author

This is the last output of the startup message.

image

@efectn
Copy link
Member

efectn commented Aug 25, 2022

This is the last output of the startup message.

image

Will check it next 2-3 days. Looks nice to me

Gökhan Özeloğlu and others added 2 commits August 25, 2022 12:29
* OS checked in tests for Windows machines.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@efectn
Copy link
Member

efectn commented Aug 29, 2022

I made a little improvements and reverted go-colorable part. It was worked on me without any problem. Maybe it can be related about your terminal.
2022-08-29_23-00

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
@gozeloglu gozeloglu requested a review from efectn August 31, 2022 07:23
@ReneWerner87 ReneWerner87 self-requested a review September 8, 2022 05:58
@ReneWerner87
Copy link
Member

@jozsefsallai what do you think about the new start message, from the code it looks good, just don't know if the design is technically good, so i'm asking someone who knows something about the subject

@gozeloglu
Copy link
Contributor Author

Hi @efectn and @ReneWerner87. When do you plan to merge this PR?

@ReneWerner87 ReneWerner87 merged commit 1a7f7ed into gofiber:v3-beta Sep 15, 2022
@ReneWerner87
Copy link
Member

now
just wanted to wait for the feedback
but we can also change this shortly before version3, if there are any comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🚀 v3 Request: Revamp Startup Message

4 participants