Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2019-08-13 08:34:30

matthewbartlett
Member
Registered: 2019-08-13

Running groovy scripts - where does the log output go?

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

#2 2019-08-13 09:16:25

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Running groovy scripts - where does the log output go?

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

#3 2022-07-07 07:51:54

Johann
Member
Registered: 2022-05-30

Re: Running groovy scripts - where does the log output go?

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

#4 2022-07-18 14:34:21

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Running groovy scripts - where does the log output go?

Hi Johann,

pls try the example in the samples: https://github.com/infofabrik/reportser … ger.groovy

Regards,
Eduardo

Offline

#5 2022-07-20 11:00:22

Johann
Member
Registered: 2022-05-30

Re: Running groovy scripts - where does the log output go?

Hi Eduardo,

Got it, thank you!

Regards,
Johann

Offline

#6 2022-07-20 11:07:55

Johann
Member
Registered: 2022-05-30

Re: Running groovy scripts - where does the log output go?

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

#7 2022-07-20 11:17:15

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Running groovy scripts - where does the log output go?

Hi Johann,

no, tout (terminal out) is only printed into the terminal.

Regards,
Eduardo

Offline

#8 2022-07-20 15:14:20

Johann
Member
Registered: 2022-05-30

Re: Running groovy scripts - where does the log output go?

Hi Eduardo,

Thank you for clarifying!

Regards,
Johann

Offline

Board footer

Powered by FluxBB