You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/hooks.md
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,12 +186,31 @@ func main() {
186
186
|`ChildPIDs`|`[]int`| Child process identifiers when preforking. |
187
187
|`ColorScheme`|[`Colors`](https://github.com/gofiber/fiber/blob/main/color.go)| Active color scheme for the startup message. |
188
188
189
-
### Startup message customization
189
+
### Startup Message Customization
190
190
191
-
Use `OnPreStartupMessage` to tweak the banner before Fiber prints it, and `OnPostStartupMessage` to run logic after the banner is printed (or skipped):
191
+
Use `OnPreStartupMessage` to tweak the banner before Fiber prints it, and `OnPostStartupMessage` to run logic after the banner is printed (or skipped). You can use some helper functions to customize the banner inside the `OnPreStartupMessage` hook.
192
192
193
-
- Assign `sm.Header` to override the ASCII art banner. Leave it empty to use the default.
194
-
- Provide `sm.PrimaryInfo` and/or `sm.SecondaryInfo` maps to replace the primary (server URL, handler counts, etc.) and secondary (prefork status, PID, process count) sections.
193
+
```go title="Signatures"
194
+
// AddInfo adds an informational entry to the startup message with "INFO" label.
- Expanded `ListenData` with versioning, handler, process, and PID metadata, plus dedicated startup message hooks for customization.
298
+
- Expanded `ListenData` with versioning, handler, process, and PID metadata, plus dedicated startup message hooks for customization. Check out the [Hooks](./api/hooks#startup-message-customization) documentation for further details.
0 commit comments