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

✨ feat(logging): Implement logging for the plugin #28

Merged
merged 2 commits into from
Dec 27, 2023
Merged

Conversation

mbtamuli
Copy link
Owner

@mbtamuli mbtamuli commented Dec 27, 2023

Closes #23

Testing

Testing by updating the value of the verbosity flag in deploy/daemonset.yaml

Verbosity 2

(No logs for now)

Verbosity 0

emptydirclone-plugin-qvn65 csi-volume-driver 2023-12-27T17:29:50.221Z	INFO	emptydirclone	emptydirclone/emptydirclone.go:56	gRPC Server listening	{"scheme": "unix", "address": "/csi/csi.sock"}

Verbosity -2

emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.455Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:38	gRPC server starting	{"config": {"Name":"emptydirclone.mriyam.dev","Endpoint":"unix:/csi/csi.sock","VendorVersion":"impl_logging-afc4308"}}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.455Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:47	parsed endpoints	{"scheme": "unix", "address": "/csi/csi.sock"}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.455Z	INFO	emptydirclone	emptydirclone/emptydirclone.go:56	gRPC Server listening	{"scheme": "unix", "address": "/csi/csi.sock"}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.455Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:62	registering servers and listening
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.518Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	started call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:29:18Z", "grpc.request.deadline": "2023-12-27T17:29:19Z", "grpc.time_ms": "0.005"}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:18.518Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	finished call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:29:18Z", "grpc.request.deadline": "2023-12-27T17:29:19Z", "grpc.code": "OK", "grpc.time_ms": "0.045"}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:19.680Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	started call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:29:19Z", "grpc.request.deadline": "2023-12-27T17:31:19Z", "grpc.time_ms": "0.026"}
emptydirclone-plugin-n8bj2 csi-volume-driver 2023-12-27T17:29:19.680Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	finished call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:29:19Z", "grpc.request.deadline": "2023-12-27T17:31:19Z", "grpc.code": "OK", "grpc.time_ms": "0.245"}

Verbosity -10

emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.048Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:38	gRPC server starting	{"config": {"Name":"emptydirclone.mriyam.dev","Endpoint":"unix:/csi/csi.sock","VendorVersion":"impl_logging-afc4308"}}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.048Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:47	parsed endpoints	{"scheme": "unix", "address": "/csi/csi.sock"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.048Z	INFO	emptydirclone	emptydirclone/emptydirclone.go:56	gRPC Server listening	{"scheme": "unix", "address": "/csi/csi.sock"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.048Z	LEVEL(-2)	emptydirclone.Serve	emptydirclone/emptydirclone.go:62	registering servers and listening
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.105Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	started call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:42Z", "grpc.request.deadline": "2023-12-27T17:28:43Z", "grpc.time_ms": "0.005"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.105Z	LEVEL(-10)	emptydirclone.Serve.gRPCLogger	log/logger.go:76	payload is not a google.golang.org/protobuf/proto.Message; programmatic error?	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:42Z", "grpc.request.deadline": "2023-12-27T17:28:43Z", "grpc.request.type": "*csi.GetPluginInfoRequest"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.105Z	LEVEL(-10)	emptydirclone.Serve.gRPCLogger	log/logger.go:76	payload is not a google.golang.org/protobuf/proto.Message; programmatic error?	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:42Z", "grpc.request.deadline": "2023-12-27T17:28:43Z", "grpc.response.type": "*csi.GetPluginInfoResponse"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:42.105Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	finished call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Identity", "grpc.method": "GetPluginInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:42Z", "grpc.request.deadline": "2023-12-27T17:28:43Z", "grpc.code": "OK", "grpc.time_ms": "0.058"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:43.645Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	started call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:43Z", "grpc.request.deadline": "2023-12-27T17:30:43Z", "grpc.time_ms": "0.028"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:43.645Z	LEVEL(-10)	emptydirclone.Serve.gRPCLogger	log/logger.go:76	payload is not a google.golang.org/protobuf/proto.Message; programmatic error?	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:43Z", "grpc.request.deadline": "2023-12-27T17:30:43Z", "grpc.request.type": "*csi.NodeGetInfoRequest"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:43.645Z	LEVEL(-10)	emptydirclone.Serve.gRPCLogger	log/logger.go:76	payload is not a google.golang.org/protobuf/proto.Message; programmatic error?	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:43Z", "grpc.request.deadline": "2023-12-27T17:30:43Z", "grpc.response.type": "*csi.NodeGetInfoResponse"}
emptydirclone-plugin-297t7 csi-volume-driver 2023-12-27T17:28:43.645Z	LEVEL(-2)	emptydirclone.Serve.gRPCLogger	log/logger.go:72	finished call	{"protocol": "grpc", "grpc.component": "server", "grpc.service": "csi.v1.Node", "grpc.method": "NodeGetInfo", "grpc.method_type": "unary", "peer.address": "@", "grpc.start_time": "2023-12-27T17:28:43Z", "grpc.request.deadline": "2023-12-27T17:30:43Z", "grpc.code": "OK", "grpc.time_ms": "0.274"}

Signed-off-by: Mriyam Tamuli <mbtamuli@gmail.com>
Signed-off-by: Mriyam Tamuli <mbtamuli@gmail.com>
@mbtamuli mbtamuli merged commit eeac769 into main Dec 27, 2023
@mbtamuli mbtamuli deleted the impl_logging branch December 27, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement logging
1 participant