Skip to content

Commit

Permalink
Add log client implementaion
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-zorn committed Aug 22, 2024
1 parent 59d182c commit 6ea6649
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions internal/analytics/log_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package analytics

import "log"

type LogClientFn struct{}

func (fn LogClientFn) Tracker() TrackerFn {
return func(_ string, _ string, _ bool) Tracker {
return &LogClient{}
}
}

type LogClient struct{}

func (c *LogClient) SendCommandRunEvent(properties map[string]interface{}) {
log.Printf("SendCommandRunEvent, properties: %v", properties)
}
func (c *LogClient) SendCommandCompletedEvent(outcome string) {
log.Printf("SendCommandCompletedEvent, outcome: %v", outcome)
}
func (c *LogClient) SendSetupStepStartedEvent(step string) {
log.Printf("SendSetupStepStartedEvent, step: %v", step)
}
func (c *LogClient) SendSetupSDKSelectedEvent(sdk string) {
log.Printf("SendSetupSDKSelectedEvent, sdk: %v", sdk)
}
func (c *LogClient) SendSetupFlagToggledEvent(on bool, count int, duration_ms int64) {
log.Printf("SendSetupFlagToggledEvent, count: %v", count)
}
func (a *LogClient) Wait() {}

0 comments on commit 6ea6649

Please sign in to comment.