We help IT Professionals succeed at work.

Anything like C/C++ _LINE_ in JAVA ?

jefftk
jefftk asked
on
Medium Priority
319 Views
Last Modified: 2008-02-01
Does anyone have any code that will do what the _LINE_ in C/C++ does when logging messages?

Thanks in advance !
Comment
Watch Question

Author

Commented:
Adjusted points to 100

Commented:
The line number is contained in a stack trace which gets generated when the exception is thrown (if the code is compiled in debug mode). Can you simply print a stack trace if something happens (otherwise why do you need a line number)?

Author

Commented:
I am trying to simulate the C/C++ environment...
There are _FILE_ and _LINE_  macros the supply the program name and line number to the logging facility...
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.