It seems that the CDebugStream class does not expose the underlying std::ostringstream, how would a Python module go about logging with a result similar to the native DEBUG macro?
For example:
a=znc.CDebugStream()dela
Successfully outputs an empty message to the debug output:
[2015-01-29 16:08:44.597957]
Yet, there's no way to set the str field, right?
Or perhaps should znc.Module have a debug method that outputs the timestamp and whatever string is passed to it.
It seems that the `CDebugStream` class does not expose the underlying `std::ostringstream`, how would a Python module go about logging with a result similar to the native `DEBUG` macro?
For example:
``` python
a = znc.CDebugStream()
del a
```
Successfully outputs an empty message to the debug output:
[2015-01-29 16:08:44.597957]
Yet, there's no way to set the `str` field, right?
Or perhaps should `znc.Module` have a `debug` method that outputs the timestamp and whatever string is passed to it.
``` python
def debug( self, message ):
if znc.CDebug.Debug():
print( '[%s] (%s) %s' % ( datetime.now(), self.__class__.__name__, message ) )
```
## <bountysource-plugin>
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8124852-expose-cdebugstream-in-modpython?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:55885977 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
It seems that the
CDebugStreamclass does not expose the underlyingstd::ostringstream, how would a Python module go about logging with a result similar to the nativeDEBUGmacro?For example:
Successfully outputs an empty message to the debug output:
[2015-01-29 16:08:44.597957]
Yet, there's no way to set the
strfield, right?Or perhaps should
znc.Modulehave adebugmethod that outputs the timestamp and whatever string is passed to it.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.