Question about NetBeans and error.printStackTrace();

I’ve noticed for a while, but never paid any mind, that NetBeans always wants to replace:

 error.printStackTrace();

with:

 Logger.getLogger(ResourceHandler.class.getName()).log(Level.SEVERE, null, ex);

Why does NetBeans do this and what does Logger do that printStackTrace() doesn’t? In the class I took we were always told to use error.printStackTrace(); and Logger was never once mentioned.