Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Improve logs

Neeraj Gupta4159974c249d
diff --git a/main.go b/main.go
index ff29b414ee..6424aea403 100644
--- a/main.go
+++ b/main.go
@@ -16,6 +16,14 @@ import (
func main() {
cliDBPath, err := GetCLIConfigPath()
+ if secrets.IsRunningInContainer() {
+ cliDBPath = constants.CliDataPath
+ _, err := internal.ValidateDirForWrite(cliDBPath)
+ if err != nil {
+ log.Fatalf("Please mount a volume to %s to persist cli data\n%v\n", cliDBPath, err)
+ }
+ }
+
if err != nil {
log.Fatalf("Could not create cli config path\n%v\n", err)
}
@@ -28,13 +36,6 @@ func main() {
}
}
db, err := pkg.GetDB(newCliPath)
- if secrets.IsRunningInContainer() {
- cliDBPath = constants.CliDataPath
- _, err := internal.ValidateDirForWrite(cliDBPath)
- if err != nil {
- log.Fatalf("Please mount a volume to %s to persist cli data\n%v\n", cliDBPath, err)
- }
- }
if err != nil {
if strings.Contains(err.Error(), "timeout") {
diff --git a/pkg/remote_sync.go b/pkg/remote_sync.go
index 281afc3298..a37a4a58cc 100644
--- a/pkg/remote_sync.go
+++ b/pkg/remote_sync.go
@@ -70,13 +70,13 @@ func (c *ClICtrl) fetchRemoteFiles(ctx context.Context) error {
break
}
if isFirstSync {
- log.Printf("First sync for album %s\n", album.AlbumName)
+ log.Printf("Sync files metadata for album %s\n", album.AlbumName)
} else {
- log.Printf("Syncing album %s\n from %s", album.AlbumName, time.UnixMicro(lastSyncTime))
+ log.Printf("Sync files metadata for album %s\n from %s", album.AlbumName, time.UnixMicro(lastSyncTime))
}
if !isFirstSync {
t := time.UnixMicro(lastSyncTime)
- log.Printf("Fetching files for album %s from %v\n", album.AlbumName, t)
+ log.Printf("Fetching files metadata for album %s from %v\n", album.AlbumName, t)
}
files, hasMore, err := c.Client.GetFiles(ctx, album.ID, lastSyncTime)
if err != nil {
diff --git a/pkg/remote_to_disk_file.go b/pkg/remote_to_disk_file.go
index 79352e119d..fc495e66f0 100644
--- a/pkg/remote_to_disk_file.go
+++ b/pkg/remote_to_disk_file.go
@@ -17,7 +17,7 @@ import (
)
func (c *ClICtrl) syncFiles(ctx context.Context, account model.Account) error {
- log.Printf("Starting sync files")
+ log.Printf("Starting file download")
exportRoot := account.ExportDir
_, albumIDToMetaMap, err := readFolderMetadata(exportRoot)
if err != nil {