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

Better logging #54

Open
2 tasks
xFrednet opened this issue Nov 15, 2024 · 0 comments
Open
2 tasks

Better logging #54

xFrednet opened this issue Nov 15, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@xFrednet
Copy link
Collaborator

FrankenScripts currently writes a lot into the console. The initial idea was to help with debugging, but it's just too much text to be useful. This is the idea:

  • Add different log levels
    • The default should print nothing, besides error messages and the help information on breakpoints
    • Info should print relevant information to get the big picture.
    • A verbose mode can print the operators and additional information
  • The name for logging is currently inconsistent.
    • Some places use object.get_name() and others object
      • Using the memory address is better for debugging
    • Suggestion:
      • The real memory address is only needed for debugging. In most cases, it would be better to have a short fake memory address. This one would be used, unless debugging is enabled. These addresses should be deterministic, to allow for better testing
        • The short memory address could be a four digit hex number: 0x0001, 0x0002 ...
        • Or even include some object information: Obj 0x0001, Str 0x0001, Bridge 0x0001...
      • Split ObjectDyn::get_name() into:
        • ObjectDyn::get_name(): Returns the object or fake short address as a string
        • ObjectDyn::get_info(): Used by mermaid for additional info, like string literals or LRC for regions

Extracted from: #36

@xFrednet xFrednet added the enhancement New feature or request label Nov 15, 2024
@xFrednet xFrednet added this to the PLDI milestone Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant