Major Logging Overhaul
in this commit: - centralize logging output handler. - set global Info/Debug/Error log levels based on config file or flags. - remove per-plugin debug arg handling. - add a I!, D!, or E! to every log message. - add configuration option to specify where to send logs. closes #1786
This commit is contained in:
@@ -80,7 +80,7 @@ func (c *CloudWatch) Connect() error {
|
||||
_, err := svc.ListMetrics(params) // Try a read-only call to test connection.
|
||||
|
||||
if err != nil {
|
||||
log.Printf("cloudwatch: Error in ListMetrics API call : %+v \n", err.Error())
|
||||
log.Printf("E! cloudwatch: Error in ListMetrics API call : %+v \n", err.Error())
|
||||
}
|
||||
|
||||
c.svc = svc
|
||||
@@ -131,7 +131,7 @@ func (c *CloudWatch) WriteToCloudWatch(datums []*cloudwatch.MetricDatum) error {
|
||||
_, err := c.svc.PutMetricData(params)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("CloudWatch: Unable to write to CloudWatch : %+v \n", err.Error())
|
||||
log.Printf("E! CloudWatch: Unable to write to CloudWatch : %+v \n", err.Error())
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user