// Path: src/main/java/com/indeed/proctor/webapp/util/threads/LogOnUncaughtExceptionHandler.java
// public class LogOnUncaughtExceptionHandler implements UncaughtExceptionHandler {
//     private Logger logger = Logger.getLogger(LogOnUncaughtExceptionHandler.class);
// 
//     public LogOnUncaughtExceptionHandler(){}
// 
// 
//     public LogOnUncaughtExceptionHandler(final Logger logger) {
//         this.logger = logger;
//     }
// 
//     public void setLogger(final Logger logger) {
//         this.logger = logger;
//     }
// 
//     @Override
//     public void uncaughtException(final Thread t, final Throwable e) {
//         logger.error("Uncaught throwable in thread " + t.getName() + "/" + t.getId(), e);
//     }
// }


import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.indeed.proctor.webapp.util.threads.LogOnUncaughtExceptionHandler;
import org.springframework.beans.factory.FactoryBean;
import java.util.concurrent.ThreadFactory;
package com.indeed.proctor.webapp.util.spring;



/**
 */
public class ThreadFactoryBean implements FactoryBean<ThreadFactory> {
    private String nameFormat;

    @Override
    public ThreadFactory getObject() throws Exception {
        return new ThreadFactoryBuilder()
                .setNameFormat(this.nameFormat)
// Path: src/main/java/com/indeed/proctor/webapp/util/threads/LogOnUncaughtExceptionHandler.java
// public class LogOnUncaughtExceptionHandler implements UncaughtExceptionHandler {
//     private Logger logger = Logger.getLogger(LogOnUncaughtExceptionHandler.class);
// 
//     public LogOnUncaughtExceptionHandler(){}
// 
// 
//     public LogOnUncaughtExceptionHandler(final Logger logger) {
//         this.logger = logger;
//     }
// 
//     public void setLogger(final Logger logger) {
//         this.logger = logger;
//     }
// 
//     @Override
//     public void uncaughtException(final Thread t, final Throwable e) {
//         logger.error("Uncaught throwable in thread " + t.getName() + "/" + t.getId(), e);
//     }
// }


// Path: src/main/java/com/indeed/proctor/webapp/util/spring/ThreadFactoryBean.java
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.indeed.proctor.webapp.util.threads.LogOnUncaughtExceptionHandler;
import org.springframework.beans.factory.FactoryBean;
import java.util.concurrent.ThreadFactory;

package com.indeed.proctor.webapp.util.spring;



/**
 */
public class ThreadFactoryBean implements FactoryBean<ThreadFactory> {
    private String nameFormat;

    @Override
    public ThreadFactory getObject() throws Exception {
        return new ThreadFactoryBuilder()
                .setNameFormat(this.nameFormat)
                .setUncaughtExceptionHandler(new LogOnUncaughtExceptionHandler())