Skip to content

[SDK] Better error logging, logdump #434

@SaadBazaz

Description

@SaadBazaz

Commands like usdk create can crash at any point. Currently, it's hard for developers to share logs as they have to copy-paste their entire chat.

Having a log file with "redacted" tokens might make it easiers for devs to share errors. Also, the content of the logfile can be directly uploaded to Telemetry like Sentry for error capture.

Possible approach

We can try-catch the CLI and then dump the stack trace + questionsSoFar into a .log file, stored in either the same folder as a file called .usdk-crash.dump maybe. Or, could be a JSON file. Really depends on international standards. See how npm manages it here (this should be a very helpful example, maybe we can just piggyback off of npm's or node's existing crash mechanisms).

I want more thoughts on this.

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions