StandardLanguage=de
DirectOpenposting=yes
+Mir.Localizer.Logfile=log/localizer.log
+
#note that you can't make pdf's without making fo's
GenerateFO=yes
GeneratePDF=yes
producers = MirGlobal.localizer().producers().factories();
producerJobQueue = new JobQueue();
try {
- log = new PrintWriter(new FileWriter(new File("/tmp/producer.log")));
+ log = new PrintWriter(new FileWriter( (new RandomAccessFile(MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Producer.Logfile"), "rw")).getFD()));
}
catch (Exception e) {
- throw new ProducerEngineRuntimeExc("Creating PrintWriter log failed",e);
+// throw new ProducerEngineRuntimeExc("Creating PrintWriter log failed",e);
+ log = new PrintWriter(new NullWriter());
}
queueThread = new Thread(new ProducerJobQueueThread());
queueThread.start();
package mircoders.localizer.basic;
import freemarker.template.*;
+import mir.misc.*;
import mircoders.localizer.*;
+import mircoders.global.*;
public class MirBasicGeneratorLocalizer extends FreemarkerGeneratorLocalizer {
+ protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
public MirBasicGeneratorLocalizer (String aTemplateRoot) {
super(aTemplateRoot);
package mircoders.localizer.basic;
-import mircoders.localizer.*;
+import mir.misc.*;
import mircoders.global.*;
+import mircoders.localizer.*;
public class MirBasicLocalizer implements MirLocalizer {
+ protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
public MirProducerLocalizer producers() {
return new MirBasicProducerLocalizer();
import java.util.*;
import javax.servlet.http.*;
-import mircoders.localizer.*;
+import mir.misc.*;
import mircoders.global.*;
+import mircoders.localizer.*;
public class MirBasicOpenPostingLocalizer implements MirOpenPostingLocalizer {
+ protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
public void afterContentPosting() {
MirGlobal.producerEngine().addJob("content", "new");
import java.util.*;
import mir.producer.*;
+import mir.misc.*;
import mircoders.global.*;
import mircoders.localizer.*;
import mircoders.producer.*;
public class MirBasicProducerLocalizer implements MirProducerLocalizer {
private Map producerFactories;
+ protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
public MirBasicProducerLocalizer() {
producerFactories = new HashMap();
}
protected void setupSynchronizationFactory(CompositeProducerNode aProducerNode) {
- if(MirGlobal.getConfigBooleanProperty("Rsync")){
+ if(MirGlobal.getConfigBooleanProperty("Rsync")){
aProducerNode.addSubNode(
new ScriptCallingProducerNode(MirGlobal.getConfigProperty("Rsync.Script.Path"))
);
import mircoders.global.*;
public class MirBasicProducerToolLocalizer implements MirProducerToolLocalizer {
+ protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
public void initializeGenerationValueSet(Map aValueSet) {
// ML: these config settings will be included more beautifully as soon as the new config system is in place
languageList = languageModule.getByWhereClause("", "id", -1);
}
catch (Throwable t) {
- System.out.println("initializeGenerationValueSet: Exception "+t.getMessage());
- t.printStackTrace(System.out);
+ logger.printError("initializeGenerationValueSet: Exception "+t.getMessage());
}
aValueSet.put("topics", topicList);
);
}
catch (Throwable t) {
+ logger.printError("EHProducerLocalizer.setupContentFactory: Exception "+t.getMessage());
}
contentNode.addVerb( "all", "is_published='1'", "" );
);
}
catch (Throwable t) {
- try {
- PrintWriter log = new PrintWriter(new FileWriter(new File("/tmp/errorbla.log")));
- log.println(t.getMessage());
- t.printStackTrace(log);
- }
- catch (Throwable q) {
- }
+ logger.printError("EHProducerLocalizer.setupStartPageFactory: Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("EHProducerLocalizer.setupStaticFactory: Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("EHProducerLocalizer.setupTopicsFactory: Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupContentFactory: Exception "+t.getMessage());
}
contentNode.addVerb( "all", "is_published='1'", "" );
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupStartPageFactory: Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupTopicsFactory Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupStaticFactory Exception "+t.getMessage());
}
}
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupFactories Exception "+t.getMessage());
}
aFactoriesMap.put("features", new NodedProducerFactory( node ) );
);
}
catch (Throwable t) {
+ logger.printError("IndyNLProducerLocalizer.setupFactories Exception "+t.getMessage());
}
aFactoriesMap.put("featurestest", new NodedProducerFactory( node ) );
}