Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option to log to file #11

Open
nlowe opened this issue May 25, 2020 · 2 comments
Open

Add Option to log to file #11

nlowe opened this issue May 25, 2020 · 2 comments
Labels
area/ui enhancement New feature or request

Comments

@nlowe
Copy link
Owner

nlowe commented May 25, 2020

cview clears the screen when it exits. Can we turn this off so we can still read panics if they happen? Additionally, we should add an option to tee the logrus output to a file to make reporting bugs easier.

@nlowe nlowe added enhancement New feature or request area/ui labels May 25, 2020
@nlowe
Copy link
Owner Author

nlowe commented May 25, 2020

According to gdamore/tcell#262 this may not be possible for all terminals (and doesn't look to be implemented for any platforms yet). We will have to figure something else out for panics.

@tslocum
Copy link

tslocum commented Oct 6, 2020

Hey @nlowe, you should be able to read panic messages when using cview because of the following in application.go:

// We catch panics to clean up because they mess up the terminal.
defer func() {
	if p := recover(); p != nil {
		if screen != nil {
			screen.Fini()
		}
		panic(p)
	}
}()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants