Skip to content

Fix issue with log destroyed error message on mount and extra logs on unmount#856

Open
jfantinhardesty wants to merge 1 commit intomainfrom
fix_error_logging_mount_unmount
Open

Fix issue with log destroyed error message on mount and extra logs on unmount#856
jfantinhardesty wants to merge 1 commit intomainfrom
fix_error_logging_mount_unmount

Conversation

@jfantinhardesty
Copy link
Contributor

What type of Pull Request is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Describe your changes in brief

This fixes extra errors that were printed on mount success where the logger could be destroyed multiple times and print out a message like:

panic: close of closed channel

goroutine 1 [running]:
github.com/Seagate/cloudfuse/common/log.(*BaseLogger).Destroy(0x2c4404738200)
        github.com/Seagate/cloudfuse/common/log/base_logger.go:208 +0x1f
github.com/Seagate/cloudfuse/common/log.Destroy()
        github.com/Seagate/cloudfuse/common/log/logger.go:143 +0x74
main.main()
        github.com/Seagate/cloudfuse/main.go:49 +0x59

Now the logger can only be destroyed once. Also removed extra logging in unmount that was printing to stdout.

Checklist

  • Tested locally
  • Added new dependencies
  • Updated documentation
  • Added tests

Related Issues

  • Related Issue #
  • Closes #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant