Comments (6)
Do you have any examples you are looking at? If something goes to stdout, we could capture that, but I'm not sure there is a great way to selectively capture logging messages going to stdout and pass through other things that are going to stdout.
from pywlroots.
If you are looking to capture wlroots's logging, does running wlroots.util.log.log_init
solve your problem? That should setup the wlr logging to callback into log_func_callback
for logging.
from pywlroots.
If I stick print("hi")
within log_func_callback
then I see a lot of lines printed to stdout, as expected. I think what's happened is I was expecting a similar signature between:
void wlr_log_init(enum wlr_log_importance verbosity, wlr_log_func_t callback);
and
def log_init(log_level: int) -> None
I guess the intended usage is to use an interface exposed by the logging
module to change where the messages end up?
from pywlroots.
This does it:
import logging
from wlroots.util.log import logger, log_init
class PrintHandler(logging.Handler):
def emit(self, record):
print(record)
logger.addHandler(PrintHandler())
log_init(logging.DEBUG)
from pywlroots.
Nice! Does something like this do the trick, too?
import logging
from wlroots.util.log import log_init
logging.basicConfig(level=logging.DEBUG)
log_init(logging.DEBUG)
from pywlroots.
from pywlroots.
Related Issues (20)
- pywlr 0.16.x: xdg_shell.XdgTopLevel: "base" property is not implemented HOT 1
- Remove exception from SceneOutput.commit: Should return boolean
- fatal error: xkbcommon/xkbcommon.h: No such file or directory. HOT 8
- Check usage of context managers HOT 2
- OutputHeadV1State: Invalid custom_mode setter
- Pointer: Missing data property
- Avoid usage of deprecated surface module
- Touch: Missing data property
- pywlroots wheel contains unnecessary libs HOT 4
- XdgTopLevel: Incorrect check of the pointer, a parent is always returned
- Release 0.16.8 HOT 1
- Seat.touch_point_clear_focus: Wrong signature: Takes too many arguments
- Support for wlr_tablet_tool HOT 3
- WLR 0.17 - Proposal: Rename XdgTopLevel to XdgToplevel HOT 1
- Inconsistencies with setters and getters HOT 13
- Release 0.16.9 HOT 2
- Renderer: autocreate() checks for a truth value not for ffi.NULL
- Future API improvements HOT 2
- Issue building qtile wheels when with xkbcommon=1.0 HOT 1
- segfault when trying to use `wlr_foreign_toplevel_manager_v1` protocol HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywlroots.