mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: Optimize openim scripts and standard output logs (#1866)
* feat: add component check func * fix: fix the outpu error * fix: fix the stderr outpu * fix: fix the component check func * fix: fix the error * fix: fix the output error * fix: del the disruptions code * fix the log output format * fix: fix the tools version * fix: fix the cycle detection * fix: fix the error * fix: fix the flag * fix: add mongo ping detection * fix: fix the tools pkg version * fix: del the err * feat: support openim readme docs Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: support openim readme docs Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: support openim readme docs Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * fix: fix the minio nil error * fix: del the repeated wrap and add err print * fix: fix this bug scripts * Revert "Check" --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> Co-authored-by: luhaoling <2198702716@qq.com>
This commit is contained in:
+7
-16
@@ -1,17 +1,3 @@
|
||||
// Copyright © 2023 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -22,6 +8,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
maxprocs.Set()
|
||||
fmt.Print(runtime.GOMAXPROCS(0))
|
||||
// Set maxprocs with a custom logger that does nothing to ignore logs.
|
||||
maxprocs.Set(maxprocs.Logger(func(string, ...interface{}) {
|
||||
// Intentionally left blank to suppress all log output from automaxprocs.
|
||||
}))
|
||||
|
||||
// Now this will print the GOMAXPROCS value without printing the automaxprocs log message.
|
||||
fmt.Println(runtime.GOMAXPROCS(0))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user