mirror of
https://kolaente.dev/konrad/docker-db-backup.git
synced 2026-01-10 03:00:08 +01:00
chore: use log everywhere
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MysqlDumper struct {
|
type MysqlDumper struct {
|
||||||
@@ -51,7 +51,7 @@ func (m *MysqlDumper) buildDumpArgs() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *MysqlDumper) Dump(c *client.Client) error {
|
func (m *MysqlDumper) Dump(c *client.Client) error {
|
||||||
fmt.Printf("Dumping mysql database from container %s...\n", m.Container.Name)
|
log.Printf("Dumping mysql database from container %s...\n", m.Container.Name)
|
||||||
|
|
||||||
args := m.buildDumpArgs()
|
args := m.buildDumpArgs()
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PostgresDumper struct {
|
type PostgresDumper struct {
|
||||||
@@ -45,7 +46,7 @@ func (d *PostgresDumper) buildConnStr() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *PostgresDumper) Dump(c *client.Client) error {
|
func (d *PostgresDumper) Dump(c *client.Client) error {
|
||||||
fmt.Printf("Dumping postgres database from container %s...\n", d.Container.Name)
|
log.Printf("Dumping postgres database from container %s...\n", d.Container.Name)
|
||||||
|
|
||||||
connStr := d.buildConnStr()
|
connStr := d.buildConnStr()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user