Skip to content

Extract Logging Functions #1

@cycomachead

Description

@cycomachead

Hey,

So I was looking into stealing some of the logging code for the autograder, since most of the interactions we'd want to track are pretty similar. This isn't urgent or anything...

Do you think it'd make sense to extract out the logging functions into a place where they could be dynamically loaded / proxied?

I was thinking of doing something like this:

let entry_logging = [
     [IDE_Morph.prototype.openIn, "IDE.opened"],
     [snap_function, "name", paramerters_function]
]

And then we could loop through the list and install proxies for each method. There are going a few cases where stuff is really nested inside Snap!, that would be hard to handle, but some of them could be solved by extracting Snap!'s callbacks from anonymous functions into ones that are accessible.

I think we could get the parameters to work by binding a function that returns them, though I haven't gotten a chance to try this...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions