Skip to content

Better logging #54

@xFrednet

Description

@xFrednet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions