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

Idea : Forced exception inside logger to print stack trace. #6

Open
gs-akhan opened this issue May 23, 2015 · 4 comments
Open

Idea : Forced exception inside logger to print stack trace. #6

gs-akhan opened this issue May 23, 2015 · 4 comments
Labels

Comments

@gs-akhan
Copy link
Owner

This is just idea we can discuss.
After reading Salesforce System class, There is no way to print stack trace where this debugger was written.
So what I was thinking is if we manually throw exception and from catch block we get

e.getStacktraceString();

we can pass this information to client as well.

@gs-akhan gs-akhan added the Idea label May 23, 2015
@gs-skumar
Copy link
Collaborator

if motive is to get class name only then we can get like
String.valueOf(this).substring(0,String.valueOf(this).indexOf(':'));

On Sat, May 23, 2015 at 7:55 PM, Azharuddin [email protected]
wrote:

This is just idea we can discuss.
After reading Salesforce System class, There is no way to print stack
trace where this debugger was written.
So what I was thinking is if we manually throw exception and from catch
block we get

e.getStacktraceString();

we can pass this information to client as well.


Reply to this email directly or view it on GitHub
#6.

@gs-akhan
Copy link
Owner Author

Yes, the idea is to get class name.
But String.valueOf(this).substring(0,String.valueOf(this).indexOf(':')); will give class name as
"RestLogger" if it is used as RestLogger.debug()

@gs-skumar
Copy link
Collaborator

Will not call this from RestLogger class, developer can pass this as
parameter to our debug function.
On May 24, 2015 4:49 PM, "Azharuddin" [email protected] wrote:

Yes, the idea is to get class name.
But String.valueOf(this).substring(0,String.valueOf(this).indexOf(':'));
will give class name as
"RestLogger" if it is used as RestLogger.debug()


Reply to this email directly or view it on GitHub
#6 (comment)
.

@gs-akhan
Copy link
Owner Author

Oh yes. that makes sense. nice idea.

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

No branches or pull requests

2 participants