Skip to content

Commit

Permalink
maint: remove uncessary annoying logs and fix typos (#181)
Browse files Browse the repository at this point in the history
Those are polluting our current logs and we are better without them
  • Loading branch information
didrocks authored Jan 19, 2024
2 parents 4141f37 + 8bc3fe1 commit 735d34e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/authd/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package main is the windows-agent entry point.
// Package main is the entry point.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions internal/brokers/examplebroker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (b *Broker) NewSession(ctx context.Context, username, lang string) (session
neededAuthSteps: 1,
attemptsPerMode: make(map[string]int),
}

switch username {
case "user-mfa":
info.neededAuthSteps = 3
Expand Down
3 changes: 0 additions & 3 deletions pam/internal/adapter/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ func (m *UIModel) Init() tea.Cmd {

// Update handles events and actions to be done from the main model orchestrator.
func (m *UIModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
log.Debugf(context.TODO(), "%+v", msg)

switch msg := msg.(type) {
// Key presses
case tea.KeyMsg:
Expand Down Expand Up @@ -227,7 +225,6 @@ func (m *UIModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (m *UIModel) View() string {
var view strings.Builder

log.Info(context.TODO(), m.currentStage())
switch m.currentStage() {
case stageUserSelection:
view.WriteString(m.userSelectionModel.View())
Expand Down
4 changes: 0 additions & 4 deletions pam/internal/adapter/textinputmodel.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package adapter

import (
"context"

"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
"github.com/ubuntu/authd/internal/log"
)

// textinputModel is a base block for handling textinput.Model, delegating to a tea.Model approach.
Expand All @@ -22,6 +19,5 @@ func (m *textinputModel) Init() tea.Cmd {
func (m *textinputModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
m.Model, cmd = m.Model.Update(msg)
log.Info(context.TODO(), "Update is called")
return m, cmd
}

0 comments on commit 735d34e

Please sign in to comment.