Skip to content

Commit

Permalink
Staging v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yunkon-kim committed Sep 26, 2024
1 parent cafb3cf commit ba45d71
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ Computing Infrastructure Migration framework (codename: cm-beetle) is going to s

## How to run and use CM-Beetle

1. [How to run and use the CM-Beetle](https://github.com/cloud-barista/cm-beetle/discussions/73)
2. [How to deploy CM-Beetle, along with its related components](https://github.com/cloud-barista/cm-beetle/discussions/105)
1. [How to deploy CM-Beetle, along with its related components](https://github.com/cloud-barista/cm-beetle/discussions/105)

Note - Deprecated, [How to run and use the CM-Beetle](https://github.com/cloud-barista/cm-beetle/discussions/73)

---

Expand Down
2 changes: 1 addition & 1 deletion deployments/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ networks:
services:
# cm-beetle
cm-beetle:
image: cloudbaristaorg/cm-beetle:0.2.1
image: cloudbaristaorg/cm-beetle:0.2.2
container_name: cm-beetle
pull_policy: missing
build:
Expand Down
10 changes: 10 additions & 0 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ func NewLogger(config Config) *zerolog.Logger {
Compress: config.Compress,
}

// Ensure the log file directory exists before creating the log file
dir := filepath.Dir(config.LogFilePath)
if _, err := os.Stat(dir); os.IsNotExist(err) {
// Create the directory if it does not exist
err = os.MkdirAll(dir, 0755) // Set permissions as needed
if err != nil {
log.Fatal().Msgf("Failed to create log directory: %v", err)
}
}

// Ensure the log file exists before changing its permissions
if _, err := os.Stat(config.LogFilePath); os.IsNotExist(err) {
// Create the log file if it does not exist
Expand Down

0 comments on commit ba45d71

Please sign in to comment.