indicar que tipo de log es

This commit is contained in:
Cat /dev/Nulo 2023-05-09 09:46:17 -03:00
parent e27c98c404
commit 48f7aa40d5
3 changed files with 4 additions and 4 deletions

View file

@ -37,11 +37,11 @@ func main() {
go func(d Domain, wg *sync.WaitGroup) {
record, err := d.NameServer.SetRecord(ctx, d.Name, config.Ip)
if err != nil {
log.Printf("[%s] error: %s", d.Name, err.Error())
log.Printf("ERROR: [%s] %s", d.Name, err.Error())
// TODO: Reportar errores
return
}
log.Printf("[%s] Set to %s", d.Name, record)
log.Printf("info: [%s] Set to %s", d.Name, record)
wg.Done()
}(d, &wg)

View file

@ -39,7 +39,7 @@ func (h *HeNet) SetRecord(ctx context.Context, domain string, overrideIp string)
if err != nil {
return "", err
}
log.Printf("[he.net ddns(%s)] Response: %s", domain, string(body))
log.Printf("debug: [he.net ddns(%s)] Response: %s", domain, string(body))
things := strings.Split(string(body), " ")
if len(things) != 2 {

View file

@ -57,7 +57,7 @@ func (n *Njalla) SetRecord(ctx context.Context, domain string, overrideIp string
if err != nil {
return "", err
}
log.Printf("[njalla ddns] Response: %s", string(body))
log.Printf("debug: [njalla ddns] Response: %s", string(body))
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return "", errors.New("Not nice status code: " + strconv.Itoa(resp.StatusCode) + " with body: " + string(body))