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

Add function to enable DebugLog from for external use #300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/connector/ble/ble.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ var (
mu sync.Mutex
)

func SetDebugLog() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't belong in ble.go, since the logging level is shared between sub-packages.

I think the solution here is to move internal/log to pkg/log.

A more involved solution would be to migrate to slog or other structured logging package.

log.SetLevel(log.LevelDebug)
}

type Connection struct {
vin string
inbox chan []byte
Expand Down