You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ro...@apache.org on 2018/06/21 19:21:34 UTC
[trafficcontrol] branch master updated (01c5a2a -> 62066f0)
This is an automated email from the ASF dual-hosted git repository.
rob pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git.
from 01c5a2a add missing import
new 34cae1a log errors from the TO http server to the error log
new 62066f0 change log level of debug messages from error to debug
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
traffic_ops/traffic_ops_golang/crconfig/snapshot.go | 6 +++---
traffic_ops/traffic_ops_golang/traffic_ops_golang.go | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
[trafficcontrol] 01/02: log errors from the TO http server to the
error log
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 34cae1ac4bf0facc413afb241904e7d2a267c323
Author: Dylan Volz <Dy...@comcast.com>
AuthorDate: Thu Jun 21 13:01:32 2018 -0600
log errors from the TO http server to the error log
---
traffic_ops/traffic_ops_golang/traffic_ops_golang.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/traffic_ops/traffic_ops_golang/traffic_ops_golang.go b/traffic_ops/traffic_ops_golang/traffic_ops_golang.go
index ba341e6..f5e2865 100644
--- a/traffic_ops/traffic_ops_golang/traffic_ops_golang.go
+++ b/traffic_ops/traffic_ops_golang/traffic_ops_golang.go
@@ -131,6 +131,7 @@ func main() {
ReadHeaderTimeout: time.Duration(cfg.ReadHeaderTimeout) * time.Second,
WriteTimeout: time.Duration(cfg.WriteTimeout) * time.Second,
IdleTimeout: time.Duration(cfg.IdleTimeout) * time.Second,
+ ErrorLog: log.Error,
}
if err := server.ListenAndServeTLS(cfg.CertPath, cfg.KeyPath); err != nil {
[trafficcontrol] 02/02: change log level of debug messages from
error to debug
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 62066f0863088636dafe2d20b95e205dc2270d85
Author: Dylan Volz <Dy...@comcast.com>
AuthorDate: Thu Jun 21 13:13:57 2018 -0600
change log level of debug messages from error to debug
---
traffic_ops/traffic_ops_golang/crconfig/snapshot.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/crconfig/snapshot.go b/traffic_ops/traffic_ops_golang/crconfig/snapshot.go
index f466bd3..f8780eb 100644
--- a/traffic_ops/traffic_ops_golang/crconfig/snapshot.go
+++ b/traffic_ops/traffic_ops_golang/crconfig/snapshot.go
@@ -31,7 +31,7 @@ import (
// Snapshot takes the CRConfig JSON-serializable object (which may be generated via crconfig.Make), and writes it to the snapshot table.
func Snapshot(db *sql.DB, crc *tc.CRConfig) error {
- log.Errorln("DEBUG calling Snapshot")
+ log.Debugln("calling Snapshot")
bts, err := json.Marshal(crc)
if err != nil {
return errors.New("marshalling JSON: " + err.Error())
@@ -40,7 +40,7 @@ func Snapshot(db *sql.DB, crc *tc.CRConfig) error {
if crc.Stats.DateUnixSeconds != nil {
date = time.Unix(*crc.Stats.DateUnixSeconds, 0)
}
- log.Errorf("DEBUG calling Snapshot, writing %+v\n", date)
+ log.Debugf("calling Snapshot, writing %+v\n", date)
q := `insert into snapshot (cdn, content, last_updated) values ($1, $2, $3) on conflict(cdn) do update set content=$2, last_updated=$3`
if _, err := db.Exec(q, crc.Stats.CDNName, bts, date); err != nil {
return errors.New("Error inserting the snapshot into database: " + err.Error())
@@ -53,7 +53,7 @@ func Snapshot(db *sql.DB, crc *tc.CRConfig) error {
// If the CDN exists, but the snapshot does not, the string for an empty JSON object "{}" is returned.
// An error is only returned on database error, never if the CDN or snapshot does not exist.
func GetSnapshot(db *sql.DB, cdn string) (string, bool, error) {
- log.Errorln("DEBUG calling GetSnapshot")
+ log.Debugln("calling GetSnapshot")
snapshot := sql.NullString{}
// cdn left join snapshot, so we get a row with null if the CDN exists but the snapshot doesn't, and no rows if the CDN doesn't exist.