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

I am interested in why don't provide a method in BTraceUtils to println all fields of an object? #285

Closed
zhenjunMa opened this issue Jul 25, 2017 · 2 comments

Comments

@zhenjunMa
Copy link

In my applicaiton, the params of most method is an object , not primitive type.but now so when I want to print the params, i can only use the codes below:

@BTrace 
public class AllMethods {
    @OnMethod(
        clazz="com.xxx.xxxController",
        method="getXXX",
        location=@Location(Kind.RETURN)
    )
    public static void m(AnyType[] args, @Return AnyType result) {
        printArray(args);
        printFields(result);
    }
}

this can't recursive print an object!
I am curioused about this design that not provide a method to recursive println an object....which i think is so easy to implement.

@jbachorik
Copy link
Collaborator

jbachorik commented Oct 12, 2017

Yes, it is easy to implement. Just one must keep track of back-references not get caught in endless loop. It's just there hasn't been demand for this functionality yet.
Please, feel free to open a PR with the implementation. Any contributions are greatly welcomed!

@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants