| Apache2 :: Log. Apache2 :: Log è un API Perl per i metodi di registrazione Apache. |
Scarica ora |
Apache2 :: Log. Classifica e riepilogo
- Licenza:
- The Apache License 2.0
- Nome editore:
- mod_perl Team
- Sito web dell'editore:
- http://search.cpan.org/~pgollucci/mod_perl-2.0.3/docs/api/Apache2/Log.pod
Apache2 :: Log. Tag
Apache2 :: Log. Descrizione
Apache2 :: Log è un API Perl per i metodi di registrazione Apache. Apache2 :: Log è un API Perl per i metodi di registrazione Apache.Synopsis # in Startup.pl # ---------------- Usa Apache2 :: Log; Usa Apache2 :: Const -Compile => QW (OK: log); Utilizzare Apr :: Const -Compile => QW (: successo di errore); My $ S = Apache2 :: ServerUTIL-> server; $ s-> log_error ("server: log_error"); $ s-> log_serror (__ file__, __line__, apache2 :: const :: log_err, apr :: Const :: Successo ", Log_Serror Logging a livello ERR"); $ S-> Log_Serror (Apache2 :: Log :: Log_mark, Apache2 :: Const :: LOG_DEBUG, APR :: Const :: Enotime, "Stampa di debug"); Apache2 :: ServerRec-> log_error ("avviso di routine"); Apache2 :: ServerRec :: Warn ("avviso di routine"); # in un gestore # ------------- Pacchetto foo; usare rigoroso; Utilizzare Avvertenze Fatale => "Tutto"; Usa Apache2 :: Log; Usa Apache2 :: Const -Compile => QW (OK: log); Utilizzare Apr :: Const -Compile => QW (: successo di errore); Sub Handler {My $ R = Shift; $ r-> log_error ("Richiesta: log_error"); My $ rlog = $ r-> log; per il mio livello $ QW (Emerg Alert Crit Error Warn Note Avviso Debug) {non rigoroso 'refs'; $ RLOG -> $ livello ($ pacchetto ", richiesta: livello di registro di livello $"); } # può utilizzare i metodi server pure il mio $ S = $ R-> server; $ s-> log_error ("server: log_error"); $ R-> Log_Rerror (Apache2 :: Log :: Log_mark, Apache2 :: Const :: LOG_DEBUG, APR :: Const :: Enotime, "in debug"); $ s-> log_serror (apache2 :: log :: log_mark, apache2 :: const :: log_info, apr :: const :: successo, "informazione del server"); $ s-> log_serror (apache2 :: log :: log_mark, apache2 :: const :: log_err, apr :: const :: enotime, "errore fatale"); $ r-> log_reason ("errore fatale"); $ r-> warn ("avviso di richiesta di routine"); $ s-> warn ('avviso del server di routine "); Ritorno Apache2 :: CONT :: OK; } 1; # in uno script di registro # httpd.conf: perloptions + globalRequest usa Apache2 :: ServerRec QW (Warn); # override avvertire localmente stampa "Content-type: testo / plainnn"; avvertire "il mio avviso"; Requisiti: · Requisiti perl: · Perl.
Apache2 :: Log. Software correlato