Skip to content

Commit

Permalink
fix: make log clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
zaigie committed Mar 14, 2024
1 parent 6a20adf commit 480c82b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/system/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func LimitCacheDir(cacheDirPrefix string, n int) error {
tempDir := os.TempDir()
entries, err := os.ReadDir(tempDir)
if err != nil {
logger.Errorf("LimitCacheDir: error reading temp directory: %v\n", err)
return err
}

Expand All @@ -267,6 +268,7 @@ func LimitCacheDir(cacheDirPrefix string, n int) error {
for _, dir := range dirs[n:] {
err := os.RemoveAll(dir.path)
if err != nil {
logger.Errorf("LimitCacheDir: error removing directory: %v\n", err)
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/tool/rcon.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func executeCommand(command string) (*executor.Executor, string, error) {
if useBase64 {
decoded, err := base64.StdEncoding.DecodeString(response)
if err != nil {
logger.Warnf("decode base64 error: %v\n", err)
logger.Warnf("decode base64 '%s' error: %v\n", response, err)
return exec, response, nil
}
response = string(decoded)
Expand Down

0 comments on commit 480c82b

Please sign in to comment.