Skip to content

Commit

Permalink
fix: fix license
Browse files Browse the repository at this point in the history
  • Loading branch information
mutezebra committed Jan 12, 2025
1 parent 010b6be commit 9431d50
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
17 changes: 17 additions & 0 deletions configcenter/nacos_load_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 configcenter

import (
Expand Down
9 changes: 0 additions & 9 deletions pkg/cmd/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,22 @@ type DefaultDeployer struct {
}

func (d *DefaultDeployer) initialize() error {
logger.Info("initialize")
err := initLog()
if err != nil {
logger.Warnf("[startGatewayCmd] failed to init logger, %s", err.Error())
}

logger.Info("initialize log success")
// load Bootstrap config
d.bootstrap = d.configManger.LoadBootConfig(configPath)
logger.Infof("init boot success")

initLogWithConfig(d.bootstrap)
fmt.Println("emmm")
logger.Infof("init log success")

err = initLimitCpus()
if err != nil {
logger.Errorf("[startCmd] failed to get limit cpu number, %s", err.Error())
}
logger.Infof("init cpu ?")

hotreload.StartHotReload(d.configManger, d.bootstrap)
logger.Infof("have started")

return err
}
Expand Down Expand Up @@ -194,9 +187,7 @@ func initLog() error {

func initLogWithConfig(boot *model.Bootstrap) {
if boot.Log != nil {
fmt.Println("start")
logger.InitLogger(boot.Log.Build())
fmt.Println("end")
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/common/yaml/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

import (
perrors "github.com/pkg/errors"
"gopkg.in/yaml.v3"
"gopkg.in/yaml.v2"
)

// LoadYMLConfig Load yml config byte from file
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/config_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ func (m *ConfigManager) loadRemoteBootConfigs() *model.Bootstrap {

// ViewRemoteConfig returns the current remote configuration.
func (m *ConfigManager) ViewRemoteConfig() *model.Bootstrap {
if m.load == nil {
return nil
}

return m.load.ViewRemoteConfig()
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/xds/lds.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

import (
xdsModel "github.com/dubbo-go-pixiu/pixiu-api/pkg/xds/model"
"gopkg.in/yaml.v3"
"gopkg.in/yaml.v2"
)

import (
Expand Down
2 changes: 0 additions & 2 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package logger

import (
"fmt"
"log"
"os"
"path"
)
Expand Down Expand Up @@ -79,7 +78,6 @@ func InitLog(logConfFile string) error {
}

func InitLogger(conf *zap.Config) {
log.Println("yes start")
var zapLoggerConfig zap.Config
if conf == nil {
zapLoggerConfig = zap.NewDevelopmentConfig()
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/listener_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

import (
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
"gopkg.in/yaml.v2"
)

import (
Expand Down

0 comments on commit 9431d50

Please sign in to comment.