From 4454822ad4b80c8ef326611bbe55890c45a0ed8a Mon Sep 17 00:00:00 2001 From: Greg Date: Tue, 29 Oct 2024 18:41:08 +0700 Subject: [PATCH] update --- config.yml | 4 ++-- country.xml | 2 +- database.go | 6 +++--- flexradio.go | 8 ++++---- spot.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config.yml b/config.yml index 9f7d5a2..d982310 100644 --- a/config.yml +++ b/config.yml @@ -1,7 +1,7 @@ general: delete_log_file_at_start: true log_to_file: true - log_level: INFO + log_level: DEBUG httpserver: true telnetserver: true flexradiospot: true @@ -19,7 +19,7 @@ cluster: login_prompt: "Please enter your call:" flex: ip: 10.10.10.120 #113.161.103.129 - spot_life: 600 + spot_life: 300 clublog: api: 5767f19333363a9ef432ee9cd4141fe76b8adf38 telnetserver: diff --git a/country.xml b/country.xml index f590adf..385c79d 100644 --- a/country.xml +++ b/country.xml @@ -195,7 +195,7 @@ -8.22 48.2 - false + false diff --git a/database.go b/database.go index 30edd3d..ebd6dd2 100644 --- a/database.go +++ b/database.go @@ -292,7 +292,7 @@ func (r *FlexDXClusterRepository) CreateSpot(spot FlexSpot) { } _, err = insertResult.LastInsertId() - Log.Debugf("Adding to database spot for: %s", spot.DX) + // Log.Debugf("Adding to database spot for: %s", spot.DX) if err != nil { Log.Errorf("impossible to retrieve last inserted id: %s", err) } @@ -306,7 +306,7 @@ func (r *FlexDXClusterRepository) UpdateSpotSameBand(spot FlexSpot) error { r.Log.Errorf("could not update database: %s", err) return err } - Log.Debugf("Updating spot to database: %s", spot.DX) + // Log.Debugf("Updating spot to database: %s", spot.DX) return nil } @@ -387,6 +387,6 @@ func DeleteDatabase(filePath string, log *log.Logger) { if err != nil { log.Error("could not delete existing database") } - log.Info("deleting existing database") + log.Debug("deleting existing database") } } diff --git a/flexradio.go b/flexradio.go index 70383a3..7fe03a3 100644 --- a/flexradio.go +++ b/flexradio.go @@ -207,7 +207,7 @@ func (fc *FlexClient) SendSpottoFlex(spot TelnetSpot) { } fc.SendSpot(stringSpot) - Log.Debugf("Sending spot to FlexRadio: %s", stringSpot) + // Log.Debugf("Sending spot to FlexRadio: %s", stringSpot) } func (fc *FlexClient) SendSpot(stringSpot string) { @@ -223,7 +223,7 @@ func (fc *FlexClient) ReadLine() { os.Exit(1) } - Log.Debugf("Received message from FlexRadio: %s", strings.Trim(message, "\n")) + // Log.Debugf("Received message from FlexRadio: %s", strings.Trim(message, "\n")) regRespSpot := *regexp.MustCompile(`R(\d+)\|0\|(\d+)\n`) respSpot := regRespSpot.FindStringSubmatch(message) @@ -258,9 +258,9 @@ func (fc *FlexClient) ReadLine() { respDelete := regSpotDeleted.FindStringSubmatch(message) if len(respDelete) > 0 { - spot, _ := fc.Repo.FindSpotByFlexSpotNumber(respDelete[1]) + // spot, _ := fc.Repo.FindSpotByFlexSpotNumber(respDelete[1]) fc.Repo.DeleteSpotByFlexSpotNumber(respDelete[1]) - Log.Debugf("Spot: DX: %s - Spotter: %s - Freq: %s - Band: %s - FlexID: %v deleted from database", spot.DX, spot.SpotterCallsign, spot.FrequencyHz, spot.Band, respDelete[1]) + // Log.Debugf("Spot: DX: %s - Spotter: %s - Freq: %s - Band: %s - FlexID: %v deleted from database", spot.DX, spot.SpotterCallsign, spot.FrequencyHz, spot.Band, respDelete[1]) } } } diff --git a/spot.go b/spot.go index 61e13c6..379b06f 100644 --- a/spot.go +++ b/spot.go @@ -126,7 +126,7 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te spot.DX, spot.Spotter, spot.Frequency, spot.Band, spot.Mode, spot.Comment, spot.Time, spot.DXCC) } } else { - Log.Debugf("Could not decode: %s", strings.Trim(spotRaw, "\n")) + // Log.Debugf("Could not decode: %s", strings.Trim(spotRaw, "\n")) } }