There is no LogRecord (JDK1.4 - JDK1.7) method to get the line number. If no thread handoff is occurring in your handler or upstream you can create a new Throwable().getStackTrace() and use the java.lang.StackTraceElement API to get the line number.
Example code can be found in the JavaMail API at MailLogger.inferCaller()/isLoggerImplFrame(). If you have to deal with thread handoffs, then you would have to log the line number as a log record parameter. Keep in mind that computing the callsite is expensive in terms of performance.