Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
ad09caaf
Commit
ad09caaf
authored
4 years ago
by
Xin.Zh
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #591 from AlbumenJ/nacos-fix
Fix: Nacos client logDir path seperator
parents
b11e086f
539ac9aa
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
before_ut.bat
+1
-1
1 addition, 1 deletion
before_ut.bat
common/constant/key.go
+1
-0
1 addition, 0 deletions
common/constant/key.go
config/config_center_config.go
+2
-0
2 additions, 0 deletions
config/config_center_config.go
config_center/nacos/client.go
+4
-1
4 additions, 1 deletion
config_center/nacos/client.go
with
8 additions
and
2 deletions
before_ut.bat
+
1
−
1
View file @
ad09caaf
...
...
@@ -20,7 +20,7 @@ set zkJarPath=remoting/zookeeper/zookeeper-4unittest/contrib/fatjar
set
zkJar
=
%zkJarPath%
/
%zkJarName%
if
not
exist
"
%zkJar%
"
(
md
%zkJarPath%
md
"
%zkJarPath%
"
curl
-L
%remoteJarUrl%
-o
%zkJar%
)
...
...
This diff is collapsed.
Click to expand it.
common/constant/key.go
+
1
−
0
View file @
ad09caaf
...
...
@@ -119,6 +119,7 @@ const (
CONFIG_CLUSTER_KEY
=
"config.cluster"
CONFIG_CHECK_KEY
=
"config.check"
CONFIG_TIMEOUT_KET
=
"config.timeout"
CONFIG_LOG_DIR_KEY
=
"config.logDir"
CONFIG_VERSION_KEY
=
"configVersion"
COMPATIBLE_CONFIG_KEY
=
"compatible_config"
)
...
...
This diff is collapsed.
Click to expand it.
config/config_center_config.go
+
2
−
0
View file @
ad09caaf
...
...
@@ -46,6 +46,7 @@ type ConfigCenterConfig struct {
Group
string
`default:"dubbo" yaml:"group" json:"group,omitempty"`
Username
string
`yaml:"username" json:"username,omitempty"`
Password
string
`yaml:"password" json:"password,omitempty"`
LogDir
string
`yaml:"log_dir" json:"log_dir,omitempty"`
ConfigFile
string
`default:"dubbo.properties" yaml:"config_file" json:"config_file,omitempty"`
Namespace
string
`default:"dubbo" yaml:"namespace" json:"namespace,omitempty"`
AppConfigFile
string
`default:"dubbo.properties" yaml:"app_config_file" json:"app_config_file,omitempty"`
...
...
@@ -73,5 +74,6 @@ func (c *ConfigCenterConfig) GetUrlMap() url.Values {
urlMap
.
Set
(
constant
.
CONFIG_GROUP_KEY
,
c
.
Group
)
urlMap
.
Set
(
constant
.
CONFIG_CLUSTER_KEY
,
c
.
Cluster
)
urlMap
.
Set
(
constant
.
CONFIG_APP_ID_KEY
,
c
.
AppId
)
urlMap
.
Set
(
constant
.
CONFIG_LOG_DIR_KEY
,
c
.
LogDir
)
return
urlMap
}
This diff is collapsed.
Click to expand it.
config_center/nacos/client.go
+
4
−
1
View file @
ad09caaf
...
...
@@ -18,6 +18,7 @@
package
nacos
import
(
"path/filepath"
"strconv"
"strings"
"sync"
...
...
@@ -36,7 +37,8 @@ import (
"github.com/apache/dubbo-go/common/logger"
)
const
logDir
=
"logs/nacos/log"
// Nacos Log dir, it can be override when creating client by config_center.log_dir
var
logDir
=
filepath
.
Join
(
"logs"
,
"nacos"
,
"log"
)
// NacosClient Nacos client
type
NacosClient
struct
{
...
...
@@ -87,6 +89,7 @@ func ValidateNacosClient(container nacosClientFacade, opts ...option) error {
}
url
:=
container
.
GetUrl
()
logDir
=
url
.
GetParam
(
constant
.
CONFIG_LOG_DIR_KEY
,
logDir
)
if
container
.
NacosClient
()
==
nil
{
//in dubbo ,every registry only connect one node ,so this is []string{r.Address}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment