-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Allow for disabling the shutdown message #292
Allow for disabling the shutdown message #292
Conversation
By default, it is still on, but config.shutdown_message can toggle it off
@@ -42,6 +43,14 @@ module Kemal | |||
@logger = logger | |||
end | |||
|
|||
def shutdown_message(status : Bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shutdown_message=
@shutdown_message = status | ||
end | ||
|
||
def shutdown_message? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be implemented as a getter method like
getter :shutdown_message
@@ -17,6 +17,9 @@ module Kemal | |||
property host_binding, ssl, port, env, public_folder, logging, running, | |||
always_rescue, serve_static : (Bool | Hash(String, Bool)), server, extra_options | |||
|
|||
getter :shutdown_message | |||
setter :shutdown_message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do not use property
here? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Still learning crystal, should have looked up that line above 💃
This also fixes the other half of #290 |
Is there anything else you'd like me to update or is there a chance for this to be merged? |
Hey thanks for the PR. I wasn't sure about this till now 👍 Could you please also send a PR documentation for this at https://github.com/kemalcr/kemalcr.com |
Will do. |
By default, it is still on, but config.shutdown_message can toggle it off: