[Python-de] Re: Ich sende erneut - der Code war nicht klar-
Linnea G <[email protected]>
| Newsgroups | gmane.comp.python.general.german |
|---|---|
| Message-ID | <[email protected]> |
On Monday, 4 July 2022 at 14:29:24 UTC+3, Massa, Harald Armin wrote: > Hi Linnea, > > ------------------------------------------------------------------------------------- > > > > loggin.conf: > > > > > > ------------------------------------------------------------------------------------- > > [handler_consoleHandler] > > class=StreamHandler > > level=DEBUG > > * formatter*=simpleFormatter > > args=(sys.stdout,) > > > > [*formatter_simpleFormatter*] > > format='%(asctime)s - %(name)s %(levelname)s - %(message)s' > > > > ------------------------------------------------------------------------------------- > > > > Als ich lief, bekam ich diesen Fehler: > > > > > > ------------------------------------------------------------------------------------- > > flist = cp["formatters"]["keys"] > > File "C:\Program Files (x86)\Microsoft Visual > > Studio\Shared\Python37_64\lib\configparser.py", line 958, in __getitem__ > > raise KeyError(key) > > KeyError: 'formatters' > > > > ------------------------------------------------------------------------------------- > > > configparser erwartet einen Eintrag mit dem Schlüssel "formatters". > In Deiner Config sehe ich nur "formatter" und "formatter_simpleFormatter" > > > Wenn Du mal schaust unter > https://docs.python.org/3/library/logging.config.html > > Abschnitt ConfigurationFileFormat > > dort werden Sectionen, [formatters], [loggers] und [handlers] gefordert - > die sehe ich in Deiner config nicht > > (quote von jener Seite) > > [loggers]keys=root,log02,log03,log04,log05,log06,log07 > [handlers]keys=hand01,hand02,hand03,hand04,hand05,hand06,hand07,hand08,hand09 > [formatters]keys=form01,form02,form03,form04,form05,form06,form07,form08,form09 > > > > > > > > > > > _______________________________________________ > > python-de Mailingliste -- [email protected] > > Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an > > [email protected] > > https://mail.python.org/mailman3/lists/python-de.python.org/ > > Mitgliedsadresse: [email protected] > > > > > -- > > GHUM GmbH > Harald Armin Massa > Spielberger Straße 49 > 70435 Stuttgart > 0173/9409607 > > Amtsgericht Stuttgart, HRB 734971 > GF: Harald Armin Massa Vielen Dank!! Das war die Lösung!! _______________________________________________ python-de Mailingliste -- [email protected] Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an [email protected] https://mail.python.org/mailman3/lists/python-de.python.org/ Mitgliedsadresse: [email protected]