• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender-cli / 1779499080

22 Apr 2025 10:11AM UTC coverage: 1.737% (-30.1%) from 31.802%
1779499080

push

gitlab-ci

web-flow
Merge pull request #277 from alfrunes/MEN-7794

MEN-7794: Add support for pagination when listing devices

28 of 82 new or added lines in 4 files covered. (34.15%)

770 existing lines in 17 files now uncovered.

45 of 2590 relevant lines covered (1.74%)

0.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/log/log.go
1
// Copyright 2023 Northern.tech AS
2
//
3
//        Licensed under the Apache License, Version 2.0 (the "License");
4
//        you may not use this file except in compliance with the License.
5
//        You may obtain a copy of the License at
6
//
7
//            http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//        Unless required by applicable law or agreed to in writing, software
10
//        distributed under the License is distributed on an "AS IS" BASIS,
11
//        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//        See the License for the specific language governing permissions and
13
//        limitations under the License.
14
package log
15

16
import (
17
        "fmt"
18
        "log/slog"
19
        "os"
20
)
21

22
var (
23
        logOpts = slog.HandlerOptions{
24
                Level: slog.LevelInfo,
25
        }
26
        logger = slog.New(
27
                slog.NewTextHandler(os.Stderr, &logOpts),
28
        )
29
)
30

UNCOV
31
func Setup(verb bool) {
×
NEW
32
        if verb {
×
NEW
33
                logOpts.Level = slog.LevelDebug
×
NEW
34
                logger = slog.New(slog.NewTextHandler(os.Stderr, &logOpts))
×
NEW
35
        }
×
36
}
37

38
func Err(msg string) {
×
NEW
39
        logger.Error(msg)
×
40
}
×
41

42
func Errf(msg string, args ...interface{}) {
×
NEW
43
        logger.Error(fmt.Sprintf(msg, args...))
×
44
}
×
45

UNCOV
46
func Verb(msg string) {
×
NEW
47
        logger.Debug(msg)
×
UNCOV
48
}
×
49

UNCOV
50
func Verbf(msg string, args ...interface{}) {
×
NEW
51
        logger.Debug(fmt.Sprintf(msg, args...))
×
UNCOV
52
}
×
53

UNCOV
54
func Info(msg string) {
×
NEW
55
        logger.Info(msg)
×
UNCOV
56
}
×
57

UNCOV
58
func Infof(msg string, args ...interface{}) {
×
NEW
59
        logger.Info(fmt.Sprintf(msg, args...))
×
UNCOV
60
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc