Hi.
My 2 cents ... on compat regarding the message about logging handlers.
When no log is required, log.log(_level, text, extra=context, **kwargs) in
wikipedia.logoutput() actually has no handlers and no parents (root) with
handlers. Then, from here the statement that no handlers are defined for
pywiki.
If logs are required by param settings, wikipedia.setLogfileStatus()
defines a handler for logger 'root', which will become parent of the above
"log" in wikipedia.logoutput(). "log" still has no handlers but the
logging
module will look for parents of "log". now finding them.
Maybe it is too late here ... for this to be accurate ...
The implementation is very convoluted, with globals variables and local
variables, several call to init functions, confusing names (e.g. "log" is a
method of a logger object, a function, etc.)
If you share this opinion, a refactoring would be appropriate?
Bye
Mpaa
On Sat, Aug 31, 2013 at 11:23 PM, Dr. Trigon <dr.trigon(a)surfeu.ch> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good question - otherwise we have a bug here...
On 31.08.2013 19:38, info(a)gno.de wrote:
logging should activated for those scripts listed
in config.log
list only. Isn't it?
xqt
----- Original Nachricht ---- Von: Bináris
<wikiposta(a)gmail.com> An: Pywikipedia discussion list
<pywikipedia-l(a)lists.wikimedia.org> Datum: 31.08.2013 18:08
Betreff: Re: [Pywikipedia-l] Cruft in compat
2013/8/24 John <phoenixoverride(a)gmail.com
Another point that is really frustrating is the
logging system
that complains about not having a logger defined if you run any
custom
scripts.
So this is the reason! I didn't understand why I suddenly got
those strange messages. I have a dream: someday we get back to
schöne alte Zeiten when things just worked and there was no need
to dissipate our energies for continous maintenance and following
changes. And we can just USE the bot again.
--------------------------------
_______________________________________________ Pywikipedia-l
mailing list Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l
mailing list Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iEYEARECAAYFAlIiXtcACgkQAXWvBxzBrDAY7gCgqqoftkrg1v0gHOR2ZOgmYmTY
sEEAnRZBYmt2BXbOKm5/wFtM/khlYtUQ
=5ZbM
-----END PGP SIGNATURE-----
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l