Skip to content

Conversation

@mrnugget
Copy link
Contributor

I don't care about the specifics - filename, build tag, etc. - but I
need this. And the reason why I need it is that it's hard to log
something when our TUI is active. Not because of how the TUI is
implemented, but because the whole concept of an updating TUI doesn't
gel with printf-debugging.

And this is perfect for me: I can tail -f the log file and then use
log.Printf whereever I want.

I don't care about the specifics - filename, build tag, etc. - but I
*need* this. And the reason why I need it is that it's hard to log
something when our TUI is active. Not because of how the TUI is
implemented, but because the whole concept of an updating TUI doesn't
gel with printf-debugging.

And this is perfect for me: I can `tail -f` the log file and then use
`log.Printf` whereever I want.
@mrnugget mrnugget requested a review from a team May 11, 2021 15:23
Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this to the readme?

Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @eseliger about documenting this, but otherwise, this is perfect, and I just wish I'd thought of it several months ago!

@mrnugget
Copy link
Contributor Author

Updated DEVELOPMENT.md to include info on this.

@mrnugget mrnugget merged commit 6bccea9 into main May 12, 2021
@mrnugget mrnugget deleted the mrn/debug-log branch May 12, 2021 09:08
scjohns pushed a commit that referenced this pull request Apr 24, 2023
* Set default log to src-cli.debug.log if build tag debug is used

I don't care about the specifics - filename, build tag, etc. - but I
*need* this. And the reason why I need it is that it's hard to log
something when our TUI is active. Not because of how the TUI is
implemented, but because the whole concept of an updating TUI doesn't
gel with printf-debugging.

And this is perfect for me: I can `tail -f` the log file and then use
`log.Printf` whereever I want.

* Add info to DEVELOPMENT.md
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.

4 participants