[GH-ISSUE #324] How do you log to the console? #216

Open
opened 2026-05-05 11:55:40 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @NatyveCoder on GitHub (Apr 27, 2021).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/324

Is your feature request related to a problem? Please describe.
I have no idea how to debug my application

Describe the solution you'd like
I expected console.log() to log to the terminal, but there is no output in the terminal

Describe alternatives you've considered
I'm not sure what alternatives there are.

Additional context
I'm trying to do a simple input-output app as a hello-world example. Type in text in a textbox up top, and the hashed output is output to the Text component. There is no output in my text component, and I have no way of debugging to see if my hash function is being called when the TextInput value is being changed.

Originally created by @NatyveCoder on GitHub (Apr 27, 2021). Original GitHub issue: https://github.com/kusti8/proton-native/issues/324 **Is your feature request related to a problem? Please describe.** I have no idea how to debug my application **Describe the solution you'd like** I expected console.log() to log to the terminal, but there is no output in the terminal **Describe alternatives you've considered** I'm not sure what alternatives there are. **Additional context** I'm trying to do a simple input-output app as a hello-world example. Type in text in a textbox up top, and the hashed output is output to the Text component. There is no output in my text component, and I have no way of debugging to see if my hash function is being called when the TextInput value is being changed.
gitea-mirror added the
enhancement
label 2026-05-05 11:55:40 -06:00
Author
Owner

@jcolag commented on GitHub (Jun 11, 2021):

For what it's worth (a month and a half later), I haven't had a problem getting text to the console. Or, rather, as long as I put console.log() somewhere sensible that doesn't break the build--because I have a tendency to clumsily drop it in the middle of a render--it worked.

If you don't mind my asking, how are you triggering state changes? In my note-taking program, my multi-line TextInput includes onChangeText={text => this.noteUpdated(text)}, where noteUpdated() handles state-tracking and other things. A lot of logging statements have gone in there, though I don't think there are any left just now.

I've also had decent success with Winston for a more complicated project, where I wanted to keep the output.

<!-- gh-comment-id:859759654 --> @jcolag commented on GitHub (Jun 11, 2021): For what it's worth (a month and a half later), I haven't had a problem getting text to the console. Or, rather, as long as I put `console.log()` somewhere sensible that doesn't break the build--because I have a tendency to clumsily drop it in the middle of a render--it worked. If you don't mind my asking, how are you triggering state changes? In my [note-taking program](https://github.com/jcolag/Miniboost), my multi-line `TextInput` includes `onChangeText={text => this.noteUpdated(text)}`, where `noteUpdated()` handles state-tracking and other things. A *lot* of logging statements have gone in there, though I don't think there are any left just now. I've also had decent success with [Winston](https://www.npmjs.com/package/winston) for a [more complicated project](https://github.com/jcolag/Uxuyu), where I wanted to keep the output.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#216
No description provided.