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: refactoring of alerts and send correct email alerts #1788

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions services/tasks/TaskRunner_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package tasks
import (
"bufio"
"encoding/json"
log "github.com/sirupsen/logrus"
"github.com/ansible-semaphore/semaphore/api/sockets"
"github.com/ansible-semaphore/semaphore/util"
"fmt"
"os/exec"
"time"

"github.com/ansible-semaphore/semaphore/api/sockets"
"github.com/ansible-semaphore/semaphore/util"
log "github.com/sirupsen/logrus"
)

func (t *TaskRunner) Log2(msg string, now time.Time) {
Expand Down Expand Up @@ -36,6 +38,10 @@ func (t *TaskRunner) Log(msg string) {
t.Log2(msg, time.Now())
}

func (t *TaskRunner) Logf(format string, a ...any) {
t.Log2(fmt.Sprintf(format, a...), time.Now())
}

// Readln reads from the pipe
func Readln(r *bufio.Reader) (string, error) {
var (
Expand Down
Loading
Loading