-
Recording source code information in Java trace
I want to build a logging utility for my Java application. In C/C++, preprocessor
macros can be used to embed the name of the source code file and the line
at which a method was invoked (usually for debugging this is great). Is
there any way to get similar information in Java?
Thanks.
-
Re: Recording source code information in Java trace
I have always found the plain old System.out.println("About to reverse the
frammistan") type of debugging to be perfectly satisfactory. You can
redirect its output to a file if there is too much of it. I can't imagine a
trace using line numbers being particularly useful unless I didn't have a
clue what my program was doing (like if somebody else wrote it).
Kristian Luck <kristian.luck@innovatia.net> wrote in message
news:3975c50d$1@news.devx.com...
>
> I want to build a logging utility for my Java application. In C/C++,
preprocessor
> macros can be used to embed the name of the source code file and the line
> at which a method was invoked (usually for debugging this is great). Is
> there any way to get similar information in Java?
>
> Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks