improved logs

This commit is contained in:
Francesco Mangiacrapa 2021-12-21 12:06:15 +01:00
parent 69a4f34e88
commit 26e801767d
3 changed files with 9 additions and 7 deletions

View File

@ -69,8 +69,8 @@ public class GNADataEntryConfigProfileReader {
protected GNADataEntryConfigProfile readProfileFromInfrastrucure() throws Exception {
LOG.info("called readProfileFromInfrastrucure");
String queryString = getGcubeGenericQueryString(SECONDARY_TYPE, GENERIC_RESOURCE_NAME);
LOG.info("Scope " + scope + ", trying to perform query: " + queryString);
this.scope = ScopeProvider.instance.get();
LOG.info("Scope " + scope + ", trying to perform query: " + queryString);
if (scope == null)
throw new Exception("Scope is null, set scope into ScopeProvider");

View File

@ -165,12 +165,13 @@ public class GeoportalCommon {
* @throws Exception the exception
*/
public GNADataViewerConfigProfile readGNADataViewConfig(String appID) throws Exception {
LOG.info("getGeoNaDataViewProfile called for: " + appID);
LOG.info("getGeoNaDataViewProfile called for AppID: " + appID);
if (appID == null || appID.isEmpty())
if (appID == null || appID.isEmpty()) {
LOG.info("AppID is null, so using DEFAULT: " + appID);
appID = GeoportalCommonConstants.GEOPORTAL_DATA_VIEWER_APP;
}
LOG.info("using AppId: " + appID);
GNADataViewerConfigProfileReader gdvp = new GNADataViewerConfigProfileReader(appID);
GNADataViewerConfigProfile profile = gdvp.readProfileFromInfrastrucure();
LOG.info("Returning profile: " + profile);

View File

@ -20,10 +20,11 @@ import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.junit.Before;
import org.junit.Test;
public class TestGNACommon {
private static String TOKEN = "";
private static String TOKEN = "8e74a17c-92f1-405a-b591-3a6090066248-98187548";
private static String CONTEXT = "/gcube/devsec/devVRE";
private static String USERNAME = "francesco.mangiacrapa";
@ -91,7 +92,7 @@ public class TestGNACommon {
}
// @Test
@Test
public void readGNDataEntryConfigsFromIS() throws Exception {
GeoportalCommon r = new GeoportalCommon();
@ -115,7 +116,7 @@ public class TestGNACommon {
}
}
// @Test
//@Test
public void readGNDataViewerConfigsFromIS() throws Exception {
GeoportalCommon r = new GeoportalCommon();