Skip to content

Commit 83ed16f

Browse files
authored
chore(logging): be consistent and do not emit logs from echo (#7710)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent c8173f0 commit 83ed16f

4 files changed

Lines changed: 72 additions & 4 deletions

File tree

core/cli/run.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ func (r *RunCMD) Run(ctx *cliContext.Context) error {
251251
return err
252252
}
253253

254+
xlog.Info("LocalAI is started and running", "address", r.Address)
255+
254256
if token != "" {
255257
if err := app.StartP2P(); err != nil {
256258
return err

core/http/app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func API(application *application.Application) (*echo.Echo, error) {
8686

8787
// Hide banner
8888
e.HideBanner = true
89+
e.HidePort = true
8990

9091
// Middleware - StripPathPrefix must be registered early as it uses Rewrite which runs before routing
9192
e.Pre(httpMiddleware.StripPathPrefix())

go.mod

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ require (
99
fyne.io/fyne/v2 v2.7.1
1010
github.com/Masterminds/sprig/v3 v3.3.0
1111
github.com/alecthomas/kong v1.13.0
12+
github.com/census-instrumentation/opencensus-proto v0.2.1
1213
github.com/charmbracelet/glamour v0.10.0
14+
github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f
1315
github.com/containerd/containerd v1.7.30
1416
github.com/ebitengine/purego v0.9.1
1517
github.com/fsnotify/fsnotify v1.9.0
1618
github.com/go-audio/wav v1.1.0
1719
github.com/go-skynet/go-llama.cpp v0.0.0-20240314183750-6a8041ef6b46
20+
github.com/gofiber/fiber/v2 v2.52.10
21+
github.com/gofiber/websocket/v2 v2.2.1
1822
github.com/gofrs/flock v0.13.0
23+
github.com/golang/protobuf v1.5.4
1924
github.com/google/go-containerregistry v0.20.7
2025
github.com/google/uuid v1.6.0
2126
github.com/gpustack/gguf-parser-go v0.22.1
27+
github.com/grpc-ecosystem/grpc-gateway v1.16.0
2228
github.com/hpcloud/tail v1.0.0
2329
github.com/ipfs/go-log v1.0.5
2430
github.com/jaypipes/ghw v0.21.2
@@ -34,7 +40,7 @@ require (
3440
github.com/mudler/edgevpn v0.31.1
3541
github.com/mudler/go-processmanager v0.0.0-20240820160718-8b802d3ecf82
3642
github.com/mudler/memory v0.0.0-20251216220809-d1256471a6c2
37-
github.com/mudler/xlog v0.0.4
43+
github.com/mudler/xlog v0.0.5
3844
github.com/onsi/ginkgo/v2 v2.27.3
3945
github.com/onsi/gomega v1.38.3
4046
github.com/otiai10/copy v1.14.1
@@ -56,18 +62,33 @@ require (
5662
go.opentelemetry.io/otel/exporters/prometheus v0.61.0
5763
go.opentelemetry.io/otel/metric v1.39.0
5864
go.opentelemetry.io/otel/sdk/metric v1.39.0
65+
google.golang.org/api v0.218.0
5966
google.golang.org/grpc v1.77.0
67+
google.golang.org/protobuf v1.36.10
6068
gopkg.in/yaml.v2 v2.4.0
6169
gopkg.in/yaml.v3 v3.0.1
6270
oras.land/oras-go/v2 v2.6.0
6371
)
6472

6573
require (
74+
cel.dev/expr v0.24.0 // indirect
75+
cloud.google.com/go/auth v0.14.0 // indirect
76+
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
77+
cloud.google.com/go/compute/metadata v0.9.0 // indirect
78+
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
79+
github.com/fasthttp/websocket v1.5.3 // indirect
6680
github.com/ghodss/yaml v1.0.0 // indirect
81+
github.com/google/s2a-go v0.1.9 // indirect
82+
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
83+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
6784
github.com/labstack/gommon v0.4.2 // indirect
85+
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
6886
github.com/swaggo/files/v2 v2.0.2 // indirect
87+
github.com/valyala/fasthttp v1.51.0 // indirect
6988
github.com/valyala/fasttemplate v1.2.2 // indirect
70-
google.golang.org/protobuf v1.36.10 // indirect
89+
github.com/valyala/tcplisten v1.0.0 // indirect
90+
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
91+
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect
7192
)
7293

7394
require (

0 commit comments

Comments
 (0)