Skip to content
Snippets Groups Projects
Commit 708eba3b authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #49440 resolve bokeh/cosmogramme name collision

parent bb3de032
Branches
Tags 6.20
5 merge requests!2102#57574 : correction orthographe des jours de la semaine,!2080Sandbox detach zf from storm,!2061Master,!2032Dev#49440 1455 cosmogramme integration etalon des codifications a chaque incrementiel,!2026Dev#49440 1455 cosmogramme integration etalon des codifications a chaque incrementiel
......@@ -142,7 +142,7 @@ afficherLigne(false,"Il y a ".($nb - $nb_destroy)." paniers conservés en histor
// Taille et nombre de logs
//---------------------------------------------------------------------------------
require_once("classe_log.php");
$log=new Class_log("");
$log=new log('');
$ret=$log->getTailleLogs();
afficherLigne(false,"Il y a ".$ret["nb_fic"]." logs conservés en historique pour une taille de : ".$ret["taille"]);
......
......@@ -18,11 +18,8 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
////////////////////////////////////////////////////////////////////////
// LOGS
////////////////////////////////////////////////////////////////////////
class Class_log
class log
{
private $path; // Chemin pour les logs
private $fic; // Handle du fichier
......@@ -31,10 +28,8 @@ class Class_log
private $afficher; // Afficher à l'écran ou pas
private $entete; // Entetes pour les logs de type tableau
// ----------------------------------------------------------------
// Contructeur
// ----------------------------------------------------------------
function __construct($typeLog,$afficher=true)
public function __construct($typeLog,$afficher=true)
{
$this->typeLog = $typeLog;
$this->afficher=$afficher;
......@@ -49,9 +44,7 @@ class Class_log
elseif($typeLog=="warning") $this->entete=array("n°","Bibliothèque","Type d'opération","Alerte","Valeur");
}
// ----------------------------------------------------------------
// Ouverture fichier
// ----------------------------------------------------------------
public function open($append=0)
{
// Controle de l'historique
......@@ -82,9 +75,7 @@ class Class_log
$this->fic=fopen($nom, $mode);
}
// ----------------------------------------------------------------
// Ecrire
// ----------------------------------------------------------------
public function ecrire($texte)
{
global $mode_cron;
......@@ -99,12 +90,9 @@ class Class_log
flush();
}
// ----------------------------------------------------------------
// Taille des logs
// ----------------------------------------------------------------
public function getTailleLogs()
{
// Parse directory
@$dir = opendir( $this->path) or AfficherErreur("Impossible d'ouvrir le dossier des logs : " .$this->path);
$taille=0;
$nb_fic=0;
......@@ -121,9 +109,7 @@ class Class_log
return $ret;
}
// ----------------------------------------------------------------
// Liste des logs
// ----------------------------------------------------------------
public function rendListe()
{
// Parse directory
......@@ -150,9 +136,7 @@ class Class_log
return $ret;
}
// ----------------------------------------------------------------
// Afficher le contenu du log mode texte
// ----------------------------------------------------------------
public function afficher($log)
{
if($log == "") $log = $this->typeLog . "_" . dateDuJour(0) .".log";
......@@ -169,9 +153,8 @@ class Class_log
}
fclose($fic);
}
// ----------------------------------------------------------------
// Afficher le contenu du log en mode tableau
// ----------------------------------------------------------------
public function afficherTableau($log,$arg_bib="",$arg_type_erreur="")
{
if($log == "") $log = $this->typeLog . "_" . dateDuJour(0) .".log";
......@@ -219,9 +202,8 @@ class Class_log
print('</table>');
if($nb > 2000) print('<h3>Arrêt de l\'affichage à 2000 lignes</h3>');
}
// ----------------------------------------------------------------
// rend le contenu du log en mode Synthese par bibliotheques
// ----------------------------------------------------------------
public function getTableauSynthese($log)
{
if($log == "") $log = $this->typeLog . "_" . dateDuJour(0) .".log";
......@@ -244,9 +226,7 @@ class Class_log
return $table;
}
// ----------------------------------------------------------------
// Fermeture
// ----------------------------------------------------------------
public function close()
{
fclose($this->fic);
......@@ -266,6 +246,4 @@ class Class_log
public function addInfo($message) {
$this->ecrire('<br><span class="violet">' . $message . '</span><br>');
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
......@@ -163,7 +163,7 @@ class sql {
// On log l'erreur
if (!$this->log)
$this->log = new Class_log('sql', false);
$this->log = new log('sql', false);
$this->log->open(true);
$this->log->ecrire($msg);
......
......@@ -16,13 +16,13 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
include '_init_frame.php';
require_once 'classe_log.php';
$log = new Class_log("integration");
$log = new log("integration");
if($_REQUEST["log"]) {
print('<h1>Log du '.$_REQUEST["date"].'</h1>');
......@@ -45,7 +45,7 @@ if($_REQUEST["log"]) {
<?php foreach ($log->rendListe() as $lig) { ?>
<tr>
<td><?php echo rendUrlImg('loupe.png',
'../cosmozend/cosmo/run-log/by-date/date/' . $lig['date_sql'],
'../cosmozend/cosmo/run-log/by-date/date/' . $lig['date_sql'],
'', 'Synthèse par bibliothèques');?></td>
<td><?php echo $lig["date"];?></td>
<?php
......@@ -53,17 +53,17 @@ if($_REQUEST["log"]) {
$url=rendUrlImg("loupe.png", "integre_log.php","log=".$lig["fic"]."&date=".$lig["date"]."&type=INTEGRATION","Afficher le détail");
print('<td>'. $url .'</td>');
print('<td>'. $lig["taille"] .'</td>');
// Notices traitees
$nb=(double)$sql->fetchOne("select sum(pointeur_reprise) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
$nb=(double)$sql->fetchOne("select sum(pointeur_reprise) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
print('<td align="right">'. number_format($nb, 0, ',', ' ') .'</td>');
// Erreurs
$nb=(double)$sql->fetchOne("select sum(nb_erreurs) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
$nb=(double)$sql->fetchOne("select sum(nb_erreurs) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
print('<td align="right">'. number_format($nb, 0, ',', ' ') .'</td>');
// Warnings
$nb=(double)$sql->fetchOne("select sum(nb_warnings) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
$nb=(double)$sql->fetchOne("select sum(nb_warnings) from integrations where traite != 'non' and traite='".$lig["date_sql"]."'");
print('<td align="right">'. number_format($nb, 0, ',', ' ') .'</td>');
print('</tr>');
}
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
////////////////////////////////////////////////////////////////////////////////////////////
// AFFICHAGE DES LOGS D'INTEGRATION
......@@ -24,10 +24,10 @@
include("_init_frame.php");
require_once("classe_log.php");
$log=new Class_log("integration");
$log_erreur=new Class_log("erreur");
$log_warning=new Class_log("warning");
$log_sql=new Class_log("sql");
$log=new log("integration");
$log_erreur=new log("erreur");
$log_warning=new log("warning");
$log_sql=new log("sql");
////////////////////////
// AFFICHAGE d'1 LOG
......
......@@ -48,9 +48,9 @@ require_once 'classe_bib.php';
require_once 'integration/integration_phase.php';
// Instanciations
$log = new Class_log('integration');
$log_erreur = new Class_log('erreur', false);
$log_warning = new Class_log('warning', false);
$log = new log('integration');
$log_erreur = new log('erreur', false);
$log_warning = new log('warning', false);
$chrono = new chronometre();
$chrono_fichier = new chronometre();
$chrono100notices = new chronometre();
......
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