Tronicek wrote:
  Hi,
 to automate group membership i wrote a Groovy script. It is called
 periodically via scheduler.
 This script use log4j to write some informations at info and at warning
 level to the console and to a database table.
 By now we are missing the output. It vanished since XWiki XE 1.6.
 Can you tell me how to enable the output again, please?
 Thanks.
 A simple extract (snippet):
 /* Groovy Class: $doc.fullName ([View Code>$doc.fullName?viewer=code]) #*
 */
 import org.jboss.logging.Logger;
 class UpdateGroupMembershipClass{
   def xwiki;
   def context;
   def doc;
   def log;             // Logger
   void setXWiki(xwiki)
   {
     this.xwiki = xwiki;
     this.context = this.xwiki.getXWikiContext();
     this.doc = this.context.getDoc();
     this.log = Logger.getLogger("our.organization.XWiki." +
 this.doc.getFullName());
     log.info("XWiki context initialized.");
   }
   /* other methods ... */
 }
 /* *# */
  
I guess this is a logger configuration setting (it doesn't print "info"
messages). You could either configure the logging system to print them,
or increase the importance of the message (log.error("XWiki context
initialized");)
--
Sergiu Dumitriu
http://purl.org/net/sergiu/