GlisWeb framework
_000.debug.php
Vai alla documentazione di questo file.
1 <?php
2 
58  // costanti che descrivono lo stato di funzionamento del framework
59  define( 'DEVELOPEMENT' , 'DEV' );
60  define( 'TESTING' , 'TEST' );
61  define( 'PRODUCTION' , 'PROD' );
62 
63  // costanti che definiscono le destinazioni possibili di log
64  define( 'LOG_TO_FILE' , 'LOG2FILE' );
65  define( 'LOG_TO_SYSLOG' , 'LOG2SYS' );
66  define( 'LOG_TO_GOOGLE' , 'LOG2GCE' );
67  define( 'LOG_TO_MAIL' , 'LOG2MAIL' );
68  define( 'LOG_TO_SMS' , 'LOG2SMS' );
69  define( 'LOG_TO_MYSQL' , 'LOG2MYSQL' );
70 
71  // TODO alcuni di questi metodi sono ancora da implementare e credo sia importante farlo
72  // per migliorare la reattività nella risposta a determinati eventi problematici o addirittura critici
73 
74  // livello di errori dei log
75  $cf['debug'][ TESTING ]['*']['log']['lvl'] = LOG_NOTICE;
76 
77  // frequenza di rotazione dei log
78  $cf['debug'][ TESTING ]['*']['log']['rotation'] = 'Ym';
79 
80  // livello di PHP error_reporting()
81  $cf['debug'][ TESTING ]['*']['report']['lvl'] = E_ALL;
82 
83  // destinazione dei log
84  $cf['debug'][ TESTING ]['*']['target']['*'] = array( LOG_TO_FILE => true );
85 
86  // progetto GCE per il log
87  $cf['debug'][ TESTING ]['gce']['pid'] = NULL;
88 
89  // impostazione di base per DEVELOPEMENT
90  $cf['debug'][ DEVELOPEMENT ] = $cf['debug'][ TESTING ];
91 
92  // impostazione di base per PRODUCTION
93  $cf['debug'][ PRODUCTION ] = $cf['debug'][ TESTING ];
94 
95  // debug utilizzo memoria
96  $cf['debug']['mem'] = array();
97 
98  // configurazione extra
99  if( isset( $cx['debug'] ) ) {
100  $cf['debug'] = array_replace_recursive( $cf['debug'], $cx['debug'] );
101  }
102 
103  // collegamento a $ct
104  $ct['debug'] = &$cf['debug'];
105 
106 ?>
const PRODUCTION
Definition: _000.debug.php:61
const LOG_TO_FILE
Definition: _000.debug.php:64
const TESTING
Definition: _000.debug.php:60
const DEVELOPEMENT
Definition: _000.debug.php:59
if(isset( $cx['debug'])) $ct['debug']
Definition: _000.debug.php:104
$cf['debug'][TESTING][' *']['log']['lvl']
Definition: _000.debug.php:75