1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-20 22:12:56 +00:00

Merge pull request #582 from kiyonlin/ppid2pid

Ppid2pid
This commit is contained in:
fenny 2020-07-13 19:01:29 -04:00 committed by GitHub
commit aa58673dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
app.go
View File

@ -675,7 +675,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
osName = utils.ToUpper(runtime.GOOS)
memTotal = utils.ByteSize(utils.MemoryTotal())
cpuCores = runtime.NumCPU()
ppid = os.Getppid()
pid = os.Getpid()
)
if host == "" {
host = "0.0.0.0"
@ -702,7 +702,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)),
cCyan, cBlack, fmt.Sprintf(" PORT %s\tCORES %s", cyan(port), cyan(cpuCores)),
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)),
cBlack, cyan(Version), fmt.Sprintf(" ROUTES %s\t\t\t PPID %s%s%s\n", cyan(routesLen), cyan(ppid), pids, cReset),
cBlack, cyan(Version), fmt.Sprintf(" ROUTES %s\t\t\t PID %s%s%s\n", cyan(routesLen), cyan(pid), pids, cReset),
)
// Write to io.write
_ = out.Flush()