Logging-config.Eine Wrapper-Klasse für das Modul Python Standard-Protokolliermodul | |
Jetzt downloaden |
Logging-config. Ranking & Zusammenfassung
Anzeige
- Lizenz:
- BSD License
- Preis:
- FREE
- Name des Herausgebers:
- Gavin M. Roy
- Website des Verlags:
- http://area51.myyearbook.com/trac.cgi/wiki/Staplr
Logging-config. Stichworte
Logging-config. Beschreibung
logging-config ist eine Python-Konfigurations-Wrapper-Klasse für das Standard-Python-Protokollierungspaket. Da dictconfigurator erst 2.7 verfügbar ist, und ich muss noch 2.6 unterstützen, wollte ich eine konsistente Möglichkeit, die Konfiguration der Anwendungsprotokollierung umzugehen. Ich habe versucht, das Konfigurationswörterbuch-Schema so viel zu stimmen, da es sinnvoll ist. Weitere Informationen zum Konfigurationswörterbuch-Schema finden Sie unter http://docs.python.org/Library/logging.config.html#logging-config-dictschema.example config {'Logger': {'pika': {'Propagate' ' : True, 'Level': 'Info'}, 'Tinman': {'Propagate': True, 'Level': 'Info'}}, 'Formataters': {'syslog': ('% (LevelName) s' '% (Name).% (FUNCNAME) S:% (Nachricht) s'), 'Verbose': ('% (LevelName) -10s% (ASCTIME) S% (Name) -30s' '% (FuncName) - 25s:% (Nachricht) s ')},' Filter ': keine,' Handler ': {' syslog ': {' Facility ':' local6 ',' Level ':' Info ',' formatter ':' syslog ' , 'Klasse': 'logging.handlers.syslogHandler', 'Adresse': '/ var / run / syslog'}, 'console': {'formatter': 'bose', 'debug_only': true, 'class': 'logging.streamHandler', 'Level': 'Debug'}}}}}}}}}}}}}}} yaml Datei "Beispiel.YAML":% yaml 1.2 --- Loggers: Pika: Level: Info Propagate: True Tinman: Level: Info Propagate: TRUE-Datei: Dateiname: /var/log/example.log Klasse: Protokollierung.RotatingFileHandler-Modus: A maxbytes: 104857600 BackupCount: 6 Codierung: UTF-8 D ELAY: FALSCH FORMATTER: MEBOSE-Filter: my_logger: my_app. * Formatiers: BEBOSE: "% (LevelName) -10s% (ASCTIME)% (Name) -30%% (FuncName) -25s:% (Nachricht) S" SYSLOG: "% (LevelName) S% (Name).% (FUNCNAME) S:% (MESSAGE) S" Handlers: Console: Klasse: Protokollierung.StreamHandler Formatierer: BEBOSE Debug_Only: True Level: Debug Syslog: Klasse: Protokollierung.Handler.SYSLOGHANDLER Facility: local6 Adresse: / var / run / syslog Filter: FORSATTER: SYSLOG-Ebene: InfoThe folgt dem Anschlagmodul mit den angegebenen Handlern: Import logging_config Import YAML mit offen ('Beispiel.YAML', 'R' ) als Handle: config = yaml.load (Griff) cfg = yamging_config.logging (config) cfg.setup () der Homepage des Produkts
Logging-config. Zugehörige Software
JsonrpClib-ned14.
Dieses Projekt ist eine Implementierung der JSON-RPC V2.0-Spezifikation (rückwärts-kompatibel) als Client ... ...
85