logs refactoring

This commit is contained in:
Gani Georgiev
2023-11-26 13:33:17 +02:00
parent ff5535f4de
commit 821aae4a62
109 changed files with 7320 additions and 3728 deletions
+7 -3
View File
@@ -5,8 +5,8 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"log/slog"
"net/http"
"os"
"os/exec"
@@ -120,8 +120,12 @@ func cronBinds(app core.App, loader *goja.Runtime, executors *vmsPool) {
return err
})
if err != nil && app.IsDebug() {
fmt.Println("[cronAdd] failed to execute cron job " + jobId + ": " + err.Error())
if err != nil {
app.Logger().Debug(
"[cronAdd] failed to execute cron job",
slog.String("jobId", jobId),
slog.String("error", err.Error()),
)
}
})
if err != nil {
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -429,7 +429,7 @@ declare class DateTime implements types.DateTime {
interface ValidationError extends ozzo_validation.Error{} // merge
/**
* ValidationError defines a single formatted data validation error,
* usually used as part of a error response.
* usually used as part of an error response.
*
* ` + "```" + `js
* new ValidationError("invalid_title", "Title is not valid")