Opened 2 years ago
Last modified 20 months ago
#8841 defect new
Loggers cannot have namespaces when used as descriptors
| Reported by: | Julian Berman | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | logger | Keywords: | |
| Cc: | wsanchez@… | Branch: | |
| Author: |
Description
Giving a namespace to a logger has no effect if the logger is a class attribute.
I.e.
>>> from twisted.logger import Logger >>> class F(object): ... blah = Logger(namespace="asdf") ... print blah ... ... <Logger 'asdf'> >>> print F.blah, F().blah <Logger '__console__.F'> <Logger '__console__.F'>
Change History (4)
comment:1 Changed 2 years ago by
| Cc: | wsanchez@… added |
|---|
comment:2 Changed 2 years ago by
| Keywords: | logger removed |
|---|---|
| Milestone: | → New Logging System |
comment:3 Changed 22 months ago by
| Component: | core → logger |
|---|
comment:4 Changed 20 months ago by
| Milestone: | New Logging System |
|---|
Closing New Logging System milestone; use logger component for ongoing tickets.
Note: See
TracTickets for help on using
tickets.

I think this is because
Logger.__get__constructs a newnamespaceargument instead of re-usingself.namespace.Glyph, any rememberings on why you may have done that here? I know why we set
sourcehere, but not the name space arg.