Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Mizu
Commits
1d1b62ec
Unverified
Commit
1d1b62ec
authored
3 years ago
by
Igor Gov
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Improving log dump feature logs (#207)
parent
e2db5087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cli/mizu/fsUtils/mizuLogsUtils.go
+4
-4
cli/mizu/fsUtils/mizuLogsUtils.go
with
4 additions
and
4 deletions
+4
-4
cli/mizu/fsUtils/mizuLogsUtils.go
+
4
-
4
View file @
1d1b62ec
...
...
@@ -42,19 +42,19 @@ func DumpLogs(provider *kubernetes.Provider, ctx context.Context, filePath strin
if
err
:=
AddStrToZip
(
zipWriter
,
logs
,
fmt
.
Sprintf
(
"%s.%s.log"
,
pod
.
Namespace
,
pod
.
Name
));
err
!=
nil
{
logger
.
Log
.
Errorf
(
"Failed write logs, %v"
,
err
)
}
else
{
logger
.
Log
.
Info
f
(
"Successfully added log length %d from pod: %s.%s"
,
len
(
logs
),
pod
.
Namespace
,
pod
.
Name
)
logger
.
Log
.
Debug
f
(
"Successfully added log length %d from pod: %s.%s"
,
len
(
logs
),
pod
.
Namespace
,
pod
.
Name
)
}
}
if
err
:=
AddFileToZip
(
zipWriter
,
config
.
GetConfigFilePath
());
err
!=
nil
{
logger
.
Log
.
Debugf
(
"Failed write file, %v"
,
err
)
}
else
{
logger
.
Log
.
Info
f
(
"Successfully added file %s"
,
config
.
GetConfigFilePath
())
logger
.
Log
.
Debug
f
(
"Successfully added file %s"
,
config
.
GetConfigFilePath
())
}
if
err
:=
AddFileToZip
(
zipWriter
,
logger
.
GetLogFilePath
());
err
!=
nil
{
logger
.
Log
.
Debugf
(
"Failed write file, %v"
,
err
)
}
else
{
logger
.
Log
.
Info
f
(
"Successfully added file %s"
,
logger
.
GetLogFilePath
())
logger
.
Log
.
Debug
f
(
"Successfully added file %s"
,
logger
.
GetLogFilePath
())
}
logger
.
Log
.
Infof
(
"You can find the zip with all logs in %s
\n
"
,
filePath
)
logger
.
Log
.
Infof
(
"You can find the zip
file
with all logs in %s
\n
"
,
filePath
)
return
nil
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment