Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
c245006d
Commit
c245006d
authored
Mar 30, 2016
by
jackgr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add expansion request and response logging
parent
242ad69d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
service.go
pkg/expansion/service.go
+6
-2
No files found.
pkg/expansion/service.go
View file @
c245006d
...
...
@@ -49,14 +49,18 @@ func NewService(address string, port int, backend Expander) *Service {
badRequest
(
resp
,
err
.
Error
())
return
}
reqMsg
:=
fmt
.
Sprintf
(
"
\n
handling request:
\n
%s
\n
"
,
util
.
ToYAMLOrError
(
request
))
util
.
LogHandlerText
(
"expansion service"
,
reqMsg
)
response
,
err
:=
backend
.
ExpandChart
(
request
)
if
err
!=
nil
{
badRequest
(
resp
,
fmt
.
Sprintf
(
"error expanding chart: %s"
,
err
))
return
}
util
.
LogHandlerExit
(
"expansion service"
,
http
.
StatusOK
,
"OK"
,
resp
.
ResponseWriter
)
message
:=
fmt
.
Sprintf
(
"
\n
Resources:
\n
%s
\n
"
,
response
.
Resources
)
util
.
LogHandlerText
(
"expansion service"
,
message
)
respMsg
:=
fmt
.
Sprintf
(
"
\n
returning response:
\n
%s
\n
"
,
util
.
ToYAMLOrError
(
response
.
Resources
)
)
util
.
LogHandlerText
(
"expansion service"
,
respMsg
)
resp
.
WriteEntity
(
response
)
}
webService
.
Route
(
...
...
Write
Preview
Markdown
is supported
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