Commit 342e6a7a authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

Merge branch 'fix/22502/1.9' into '1.9'

[22502] Rapatrier le fichier config de log4php (depuis Courrier) dans Capture

See merge request maarch/MaarchCapture!51
parents 23150ce9 e1acb806
......@@ -10,7 +10,7 @@
<!-- lecture des scans entrant avec séparateurs qrcode -->
<batch name="SCAN_MASS" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="SCAN_MASS" debug="false" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.default.xml" maarchLoggerName="loggerTechnique">
<workflow name="SCAN_MASS" debug="false" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="separatePDF" module="QRSeparator" name="separatePDF">
<input name="ScanSource">/opt/maarch/scanentrantqr/</input>
<input name="qrcodePrefix">false</input>
......@@ -27,7 +27,7 @@
<!-- SCAN TO MAARCHCOURRIER SAMPLE -->
<batch name="MAARCH_SCAN_TO_MC" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="MAARCH_SCAN_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="MAARCH_SCAN_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="ImportFiles" module='FileImport' function="ImportFiles">
<input name="Directory">/opt/maarch/scan/</input>
<input name="Target">Document</input>
......@@ -53,7 +53,7 @@
</batch>
<!-- MAIL TO MAARCHCOURRIER SAMPLE -->
<batch name="MAARCH_MAIL_TO_MC" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="MAARCH_MAIL_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="MAARCH_MAIL_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="CaptureMails" module="MailCapture" name="CAPTURE_MAIL_1">
<input name="account">account_1</input>
<input name="Action">move</input>
......@@ -79,7 +79,7 @@
</batch>
<!-- RECONCILE WITH QRCODE-->
<batch name="RECONCILE_QR" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="RECONCILE_QR" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="RECONCILE_QR" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="reconcile" module="QRSeparator" name="reconcile">
<input name="ScanSource">/opt/maarch/MaarchCapture/files/TEST_IMPORT/</input>
<input name="qrcodePrefix">true</input>
......@@ -95,7 +95,7 @@
<!-- RECONCILE UPDATE COURRIER WITH QRCODE -->
<batch name="UPDATE_COURRIER" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="UPDATE_COURRIER" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="UPDATE_COURRIER" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="reconcile" module="QRSeparator" name="reconcile">
<input name="ScanSource">/opt/maarch/MaarchCapture/files/TEST_IMPORT/</input>
<input name="qrcodePrefix">true</input>
......
<log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/"
threshold="all" debug="false">
<appender name="appenderFonctionnel" class="LoggerAppenderRollingFile">
<layout class="LoggerLayoutTTCC" />
<param name="file" value="./fonctionnel.log" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<layout class="LoggerLayoutPattern">
<param name="ConversionPattern" value="[%d{d/m/Y H:i:s}] %-5p [%t] %m%n" />
</layout>
</appender>
<appender name="appenderTechnique" class="LoggerAppenderRollingFile">
<layout class="LoggerLayoutTTCC" />
<param name="file" value="./technique.log" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<layout class="LoggerLayoutPattern">
<param name="ConversionPattern" value="[%d{d/m/Y H:i:s}] %-5p [%t] %m%n" />
</layout>
</appender>
<root>
<level value="ERROR" />
<appender_ref ref="fonctionnel,technique" />
</root>
<logger name="loggerFonctionnel" additivity="true">
<level value="ERROR" />
<appender_ref ref="appenderFonctionnel" />
</logger>
<logger name="loggerTechnique" additivity="true">
<level value="ERROR" />
<appender_ref ref="appenderTechnique" />
</logger>
</log4php:configuration>
......@@ -7,7 +7,7 @@
</modules>
<batches>
<batch name="MAARCH_REST_WS" directory="/opt/maarch/MaarchCapture/files/" lock="0" id="{batchname}-{timestamp}-{rand}">
<workflow name="M2M" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="M2M" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="CaptureMails" module='MailCapture' function="CaptureMails">
<input name="account">account_1</input>
<input name="Action">move</input>
......@@ -22,7 +22,7 @@
</step>
</workflow>
<workflow name="M2M_ACK" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="M2M_ACK" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="CaptureMails" module='MailCapture' function="CaptureMails">
<input name="account">account_1</input>
<input name="Action">move</input>
......@@ -37,7 +37,7 @@
</step>
</workflow>
<workflow name="M2M_REPLY" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="M2M_REPLY" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="CaptureMails" module='MailCapture' function="CaptureMails">
<input name="account">account_1</input>
<input name="Action">move</input>
......@@ -52,7 +52,7 @@
</step>
</workflow>
<workflow name="M2M_NOTIFICATION" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="M2M_NOTIFICATION" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="CaptureMails" module='MailCapture' function="CaptureMails">
<input name="account">account_1</input>
<input name="Action">move</input>
......
......@@ -9,7 +9,7 @@
<batches>
<!-- SCAN TO MAARCHCOURRIER SAMPLE WITH QRCODE SEPARATION -->
<batch name="SCAN_MASS" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="SCAN_MASS" debug="false" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="SCAN_MASS" debug="false" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="separatePDF" module="QRSeparator" name="separatePDF">
<input name="ScanSource">/opt/maarch/MaarchCapture/files/TEST_IMPORT/</input>
<input name="qrcodePrefix">false</input>
......
......@@ -8,7 +8,7 @@
<batches>
<!-- SCAN TO MAARCHCOURRIER SAMPLE -->
<batch name="MAARCH_SCAN_TO_MC" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="MAARCH_SCAN_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="MAARCH_SCAN_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="ImportFiles" module='FileImport' function="ImportFiles">
<input name="Directory">/opt/maarch/MaarchCapture/files/TEST_IMPORT/</input>
<input name="Target">Document</input>
......@@ -34,7 +34,7 @@
</batch>
<!-- MAIL TO MAARCHCOURRIER SAMPLE -->
<batch name="MAARCH_MAIL_TO_MC" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="MAARCH_MAIL_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="MAARCH_MAIL_TO_MC" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<!-- /!\ si la balise configPath est utilisée, il faut conserver tous les arguments suivants( ne pas supprimer de lignes)-->
<step function="CaptureMails" module="MailCapture" name="CAPTURE_MAIL_1">
<input name="account">account_1</input>
......@@ -81,7 +81,7 @@
<!-- RECONCILE WITH QRCODE-->
<batch name="RECONCILE_QR" directory="/opt/maarch/MaarchCapture/files/" id="{batchname}-{timestamp}-{rand}" lock="0">
<workflow name="RECONCILE_QR" debug="true" logMode="Maarch" maarchLogParam="/var/www/html/MaarchCourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="RECONCILE_QR" debug="true" logMode="Maarch" maarchLogParam="/opt/maarch/MaarchCapture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step function="reconcile" module="QRSeparator" name="reconcile">
<input name="ScanSource">/opt/maarch/MaarchCapture/files/TEST_IMPORT/</input>
<input name="qrcodePrefix">true</input>
......
......@@ -6,7 +6,7 @@
in Capture.xml :
<batch name='SCAN' directory='/exploit/maarch/maarch_capture/files/maarchcourrier' lock="0" id='{batchname}-{timestamp}-{rand}'>
<workflow name="SCAN" debug="true" logMode="Maarch" maarchLogParam="/produit/maarch/maarch_web/custom/cs_maarchcourrier/apps/maarch_entreprise/xml/log4php.xml" maarchLoggerName="loggerTechnique">
<workflow name="SCAN" debug="true" logMode="Maarch" maarchLogParam="/exploit/maarch/maarch_capture/config/log4php/log4php.xml.default" maarchLoggerName="loggerTechnique">
<step name="separatePDF" module='QRSeparator' function="separatePDF">
<input name="ScanSource">/exploit/maarch/depot/capture/entrant/maarchcourrier/</input>
</step>
......
......@@ -112,7 +112,7 @@ class LoggerPatternParser {
* @return string
*/
public function extractOption() {
if(($this->i < $this->patternLength) and ($this->pattern{$this->i} == '{')) {
if(($this->i < $this->patternLength) and ($this->pattern[$this->i] == '{')) {
$end = strpos($this->pattern, '}' , $this->i);
if($end !== false) {
$r = substr($this->pattern, ($this->i + 1), ($end - $this->i - 1));
......@@ -151,7 +151,7 @@ class LoggerPatternParser {
$this->i = 0;
$this->currentLiteral = '';
while($this->i < $this->patternLength) {
$c = $this->pattern{$this->i++};
$c = $this->pattern[$this->i++];
switch($this->state) {
case self::LITERAL_STATE:
......@@ -162,7 +162,7 @@ class LoggerPatternParser {
}
if($c == self::ESCAPE_CHAR) {
// peek at the next char.
switch($this->pattern{$this->i}) {
switch($this->pattern[$this->i]) {
case self::ESCAPE_CHAR:
$this->currentLiteral .= $c;
$this->i++; // move pointer
......@@ -304,7 +304,7 @@ class LoggerPatternParser {
break;
case 'u':
if($this->i < $this->patternLength) {
$cNext = $this->pattern{$this->i};
$cNext = $this->pattern[$this->i];
if(ord($cNext) >= ord('0') and ord($cNext) <= ord('9')) {
$pc = new LoggerUserFieldPatternConverter($this->formattingInfo, (string)(ord($cNext) - ord('0')));
$this->currentLiteral = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment