You are not logged in.
I am currently working to get LDAP working in my ReportServer DEV environment. That consists of running 2 groovy scripts ldapimport.groovy and hookldappam.groovy. In those scripts there is logger.log lines to output verbiage to the log and System.println.out lines. Where does that output go? I looked in the logs folder under ..../apache-tomcat and cannot find anything in the logs there?
Is there a log setting somewhere that I need to change or are these logs that get updated from groovy script located somewhere else?
It would be helpful to know for debugging purposes. Thanks.
Offline
Hi matthewbarlett,
you can test the logger with the following script:
import java.util.logging.Level;
import java.util.logging.Logger;
logger = Logger.getLogger(getClass().getName());
LOG_PREFIX = "getlogginginfo "; // optional
logger.log(Level.SEVERE, LOG_PREFIX + "=== START getLoggingInfo =========\n");
tout.println("=== START getLoggingInfo =========");
logger.log(Level.ALL, LOG_PREFIX + "ALL Message!");
logger.log(Level.CONFIG, LOG_PREFIX + "CONFIG Message!");
logger.log(Level.FINE, LOG_PREFIX + "FINE Message!");
logger.log(Level.FINER, LOG_PREFIX + "FINER Message!");
logger.log(Level.FINEST, LOG_PREFIX + "FINEST Message!");
logger.log(Level.INFO, LOG_PREFIX + "INFO Message!");
logger.log(Level.WARNING, LOG_PREFIX + "WARN Message!");
logger.log(Level.SEVERE, LOG_PREFIX + "SEVERE Message!");
tout.println("=== END getLoggingInfo =========");
logger.log(Level.SEVERE, LOG_PREFIX + "=== END getLoggingInfo =========");
In a standard bitnami installation, you can change the following file: c:\bitnami\reportserverenterprise-version\apps\reportserver\reportserver-conf\logging-rs.properties
to
.level = FINEST
net.datenwerke.level = INFO
then you should see in the reportserver logs (look in your tomcat/logs directory) something similar to:
14-Jun-2018 13:49:22.690 SCHWERWIEGEND [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo === START getLoggingInfo =========
14-Jun-2018 13:49:22.706 KONFIGURATION [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo CONFIG Message!
14-Jun-2018 13:49:22.706 FEIN [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo FINE Message!
14-Jun-2018 13:49:22.706 INFORMATION [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo INFO Message!
14-Jun-2018 13:49:22.706 SCHWERWIEGEND [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo SEVERE Message!
14-Jun-2018 13:49:22.706 WARNUNG [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo WARN Message!
14-Jun-2018 13:49:22.706 SCHWERWIEGEND [scriptExec-1] java_util_logging_Logger$log$0.call getlogginginfo === END getLoggingInfo =========
Regards,
Eduardo
Offline
Hi Eduardo,
When I try
import java.util.logging.Level;
I get an unable to resolve class error:
The report could not be executed: net.datenwerke.rs.scripting.service.scripting.exceptions.ScriptEngineException: javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script94.groovy: 5: unable to resolve class java.util.logging.level
@ line 5, column 1.
import java.util.logging.level
^
1 error
What could be the issue?
Regards,
Johann
Offline
Hi Johann,
pls try the example in the samples: https://github.com/infofabrik/reportser … ger.groovy
Regards,
Eduardo
Offline
Hi Eduardo,
Got it, thank you!
Regards,
Johann
Offline
Just to clarify, are we supposed to see the `tout` output in the logs as well? I am not able to find it in my logs but I do see
org.codehaud...doInvoke logger.groovy SEVERE-level message
Offline
Hi Johann,
no, tout (terminal out) is only printed into the terminal.
Regards,
Eduardo
Offline
Hi Eduardo,
Thank you for clarifying!
Regards,
Johann
Offline