@@ -29,7 +29,6 @@ import (
2929 "github.com/GoogleCloudPlatform/google-guest-agent/internal/cfg"
3030 "github.com/GoogleCloudPlatform/google-guest-agent/internal/command"
3131 "github.com/GoogleCloudPlatform/google-guest-agent/internal/events"
32- "github.com/GoogleCloudPlatform/google-guest-agent/internal/logger"
3332 "github.com/GoogleCloudPlatform/google-guest-agent/internal/metadata"
3433 "github.com/GoogleCloudPlatform/google-guest-agent/internal/plugin/manager"
3534 "google.golang.org/grpc"
@@ -50,11 +49,13 @@ var pluginServer *PluginServer
5049// initPluginServer initializes the core plugin server and starts serving
5150// requests from Guest Agent.
5251func initPluginServer () error {
52+ galog .Infof ("Initializing core plugin server..." )
5353 listener , err := net .Listen (protocol , address )
5454 if err != nil {
5555 return fmt .Errorf ("start listening on %q using %q: %v" , address , protocol , err )
5656 }
5757 defer listener .Close ()
58+ galog .Infof ("Core plugin server listening on %q using %q" , address , protocol )
5859
5960 // This is the grpc server in communication with the Guest Agent.
6061 server := grpc .NewServer ()
@@ -64,6 +65,7 @@ func initPluginServer() error {
6465 // offered mean Guest Agent was successful in installing/launching the plugin
6566 // & will manage the lifecycle (start, stop, or revision change) here onwards.
6667 pb .RegisterGuestAgentPluginServer (server , pluginServer )
68+ galog .Infof ("Core plugin server registered. Starting to serve requests..." )
6769
6870 if err := server .Serve (listener ); err != nil {
6971 return fmt .Errorf ("cannot continue serving on %q: %v" , address , err )
@@ -199,12 +201,6 @@ func (ps *PluginServer) Start(ctx context.Context, msg *pb.StartRequest) (*pb.St
199201 pCtx , cancel := context .WithCancel (context .Background ())
200202 ps .cancel = cancel
201203
202- logOpts .ProgramVersion = version
203- if err := logger .Init (pCtx , logOpts ); err != nil {
204- return nil , status .Errorf (1 , "failed to initialize logger: %v" , err )
205- }
206- loggerInitialized .Store (true )
207-
208204 // Log the config read by the core plugin to debug.
209205 cfg .Log ()
210206
0 commit comments