mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
@@ -66,9 +66,12 @@ var (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if enableMetric {
|
if profile.Metric {
|
||||||
|
println("metric collection is enabled")
|
||||||
// nolint
|
// nolint
|
||||||
metric.NewMetricClient(s.ID, *profile)
|
metric.NewMetricClient(s.ID, *profile)
|
||||||
|
} else {
|
||||||
|
println("metric collection is disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
@@ -169,6 +172,7 @@ func initConfig() {
|
|||||||
println("mode:", profile.Mode)
|
println("mode:", profile.Mode)
|
||||||
println("driver:", profile.Driver)
|
println("driver:", profile.Driver)
|
||||||
println("version:", profile.Version)
|
println("version:", profile.Version)
|
||||||
|
println("metric:", profile.Metric)
|
||||||
println("---")
|
println("---")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,6 +30,8 @@ type Profile struct {
|
|||||||
Driver string `json:"-"`
|
Driver string `json:"-"`
|
||||||
// Version is the current version of server
|
// Version is the current version of server
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
|
// Metric indicate the metric collection is enabled or not
|
||||||
|
Metric bool `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Profile) IsDev() bool {
|
func (p *Profile) IsDev() bool {
|
||||||
|
Reference in New Issue
Block a user