logs refactoring
This commit is contained in:
@@ -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 {
|
||||
|
||||
+4681
-2491
File diff suppressed because it is too large
Load Diff
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user