i have code like this :
catch (Exception ex) {
// Log the error
ex.printStackTrace();
logger.error("Error in Best Quote Thread: " + ex);
}
yes i got the error in my log like this : 2020-12-07 11:27:56 ERROR FixProtocolConvert:162 - Error in Fix Protocol Convert Thread: java.lang.NullPointerException
}catch (Exception ex) {
// Log the error
ex.printStackTrace();
logger.error("Error in FixProtocolConvert: " , ex);
}
i also have to try use this code but i only get like this : 2020-12-07 14:09:52 ERROR FixProtocolConvert:325 - Error in Fix Protocol Convert Thread: java.lang.NullPointerException java.lang.NullPointerException
how to get exactly position of this error ? like this example of ex.printstacktrace. so i need to log the value of ex.printstacktrace to my logger
com.abcd.core.datafeed.fixProtocol(FixProtocolConvert.java:121)
at
my question is how to get exactly position of this error ? because if i use that code only get log like that... thanks all