mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 21:01:40 +02:00
Rework pkg/log, add 'loglevel' and 'logdate' flags, streamline
- removes some previously added manual location strings: now handled by pkg/log depending on loglevel - kept manual string locations on fmt print functions - add 'notice' and 'critical' loglevels - add 'Panic' and 'Panicf' functions to log panics - adresses issue #26
This commit is contained in:
@@ -107,7 +107,7 @@ func LoadData(job *schema.Job,
|
||||
jd, err = repo.LoadData(job, metrics, scopes, ctx)
|
||||
if err != nil {
|
||||
if len(jd) != 0 {
|
||||
log.Errorf("METRICDATA/METRICDATA > partial error: %s", err.Error())
|
||||
log.Errorf("partial error: %s", err.Error())
|
||||
} else {
|
||||
return err, 0, 0
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func LoadNodeData(
|
||||
data, err := repo.LoadNodeData(cluster, metrics, nodes, scopes, from, to, ctx)
|
||||
if err != nil {
|
||||
if len(data) != 0 {
|
||||
log.Errorf("METRICDATA/METRICDATA > partial error: %s", err.Error())
|
||||
log.Errorf("partial error: %s", err.Error())
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user