#3269 Log detail when Service Manager can't find bean

This commit is contained in:
Chris Wilper
2021-05-10 19:53:44 -04:00
parent 0b3c52d4ee
commit 9435f70a79
2 changed files with 5 additions and 5 deletions

View File

@@ -426,10 +426,10 @@ public final class DSpaceServiceManager implements ServiceManagerSystem {
service = (T) applicationContext.getBean(name, type); service = (T) applicationContext.getBean(name, type);
} catch (BeansException e) { } catch (BeansException e) {
// no luck, try the fall back option // no luck, try the fall back option
log.info( log.warn(
"Unable to locate bean by name or id={}." "Unable to locate bean by name or id={}."
+ " Will try to look up bean by type next." + " Will try to look up bean by type next."
+ " BeansException: {}", name, e.getMessage()); + " BeansException: {}", name, e);
service = null; service = null;
} }
} else { } else {
@@ -438,9 +438,9 @@ public final class DSpaceServiceManager implements ServiceManagerSystem {
service = (T) applicationContext.getBean(type.getName(), type); service = (T) applicationContext.getBean(type.getName(), type);
} catch (BeansException e) { } catch (BeansException e) {
// no luck, try the fall back option // no luck, try the fall back option
log.info("Unable to locate bean by name or id={}." log.warn("Unable to locate bean by name or id={}."
+ " Will try to look up bean by type next." + " Will try to look up bean by type next."
+ " BeansException: {}", type.getName(), e.getMessage()); + " BeansException: {}", type.getName(), e);
service = null; service = null;
} }
} }

View File

@@ -82,7 +82,7 @@
<Logger name='org.dspace.services' <Logger name='org.dspace.services'
level='ERROR'/> level='ERROR'/>
<Logger name='org.dspace.servicemanager' <Logger name='org.dspace.servicemanager'
level='ERROR'/> level='WARN'/>
<Logger name='org.dspace.providers' <Logger name='org.dspace.providers'
level='ERROR'/> level='ERROR'/>
<Logger name='org.dspace.utils' <Logger name='org.dspace.utils'