Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add client debug flag #1234

Merged
merged 1 commit into from
Apr 28, 2018

Conversation

shaloulcy
Copy link
Contributor

add client debug flag, so we can get more debug info when running
pouch commands

Signed-off-by: Chuanyun Li lcy041536@gmail.com

Ⅰ. Describe what this PR did

Add debug flag in client. So we can get more debug infos when running pouch commands

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Add debug flag in client. So we can get more debug infos when running pouch commands

Ⅳ. Describe how to verify it

root@ubuntu-1:~# ./pouch/pouch volume create -D -n volume2  -l like=football -s host=ubuntu1
INFO[0000] start client at debug level                  
DEBU[2018-04-27 11:41:50.937401046] create a volume: volume2, options: [], labels: [like=football], selectors: [host=ubuntu1] 
Labels:       map[backend:local hostname:ubuntu-1 like:football]
Mountpoint:   /mnt/local/volume2
Name:         volume2
Scope:        
Status:       map[sifter:Default]
CreatedAt:    2018-4-27 11:41:50
Driver:       local

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added kind/bug This is bug report for project kind/feature size/S labels Apr 27, 2018
@codecov-io
Copy link

codecov-io commented Apr 27, 2018

Codecov Report

Merging #1234 into master will increase coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1234      +/-   ##
==========================================
+ Coverage   15.31%   15.34%   +0.03%     
==========================================
  Files         172      172              
  Lines       10665    10639      -26     
==========================================
  Hits         1633     1633              
+ Misses       8912     8886      -26     
  Partials      120      120
Impacted Files Coverage Δ
cli/cli.go 0% <0%> (ø) ⬆️
daemon/mgr/network.go 3.47% <0%> (-0.01%) ⬇️
cli/run.go 0% <0%> (ø) ⬆️
cli/update.go 0% <0%> (ø) ⬆️
daemon/mgr/container.go 0% <0%> (ø) ⬆️

cli/cli.go Outdated
formatter := &logrus.TextFormatter{
ForceColors: true,
FullTimestamp: true,
TimestampFormat: "2006-01-02 15:04:05.000000000",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our log's TimeStampFormat has been changed to "time.RFC3339Nano" and delete ForceColors, can you change this format like this:

	formatter := &logrus.TextFormatter{
		FullTimestamp:   true,
		TimestampFormat: time.RFC3339Nano,
	}

add client debug flag, so we can get more debug info when running
pouch commands

Signed-off-by: Chuanyun Li <lcy041536@gmail.com>
@shaloulcy shaloulcy force-pushed the add_cli_debug_mode branch from 98bb574 to a240e2e Compare April 27, 2018 14:28
@rudyfly
Copy link
Collaborator

rudyfly commented Apr 27, 2018

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Apr 27, 2018
@fuweid fuweid merged commit 3b6d1ed into AliyunContainerService:master Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants