use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.
the class JiraCloudProperties method createJiraServicesCloudFactory.
public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException {
JiraCloudRestConfig jiraServerConfig = createJiraServerConfig();
Slf4jIntLogger intLogger = new Slf4jIntLogger(logger);
JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogger);
return new JiraCloudServiceFactory(intLogger, jiraHttpClient, gson);
}
use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.
the class BlackDuckNotificationRetrieverFactory method createBlackDuckNotificationRetriever.
public Optional<BlackDuckNotificationRetriever> createBlackDuckNotificationRetriever(BlackDuckProperties blackDuckProperties) {
Optional<BlackDuckHttpClient> optionalBlackDuckHttpClient = blackDuckProperties.createBlackDuckHttpClientAndLogErrors(logger);
if (optionalBlackDuckHttpClient.isPresent()) {
BlackDuckHttpClient blackDuckHttpClient = optionalBlackDuckHttpClient.get();
BlackDuckServicesFactory blackDuckServicesFactory = blackDuckProperties.createBlackDuckServicesFactory(blackDuckHttpClient, new Slf4jIntLogger(logger));
BlackDuckNotificationRetriever notificationRetriever = new BlackDuckNotificationRetriever(blackDuckServicesFactory.getBlackDuckApiClient(), blackDuckServicesFactory.getApiDiscovery());
return Optional.of(notificationRetriever);
} else {
logger.warn("The BlackDuck configuration '{}' could not be used to retrieve notifications", blackDuckProperties.getConfigName());
}
return Optional.empty();
}
use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.
the class PhoneHomeTask method createPhoneHomeService.
private PhoneHomeService createPhoneHomeService(ExecutorService phoneHomeExecutor) {
IntLogger intLogger = new Slf4jIntLogger(logger);
ProxyInfo proxyInfo = proxyManager.createProxyInfoForHost(GoogleAnalyticsConstants.BASE_URL);
IntHttpClient intHttpClient = new IntHttpClient(intLogger, gson, IntHttpClient.DEFAULT_TIMEOUT, true, proxyInfo);
PhoneHomeClient phoneHomeClient = BlackDuckPhoneHomeHelper.createPhoneHomeClient(intLogger, intHttpClient.getClientBuilder(), gson);
return PhoneHomeService.createAsynchronousPhoneHomeService(intLogger, phoneHomeClient, phoneHomeExecutor);
}
Aggregations