Add config.log_events.
A way of logging pygame events.
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "run.sh --build",
|
||||
"type": "shell",
|
||||
"command": "/home/tom/ab/renpy/run.sh --build",
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1450,6 +1450,9 @@ screens_never_cancel_hide = True
|
||||
# A list of transforms that are applied to entire layers.
|
||||
layer_transforms = { }
|
||||
|
||||
# Set this to true to log events to log.txt.
|
||||
log_events = os.environ.get("RENPY_LOG_EVENTS", False)
|
||||
|
||||
# Should Ren'Py scan for exec.py?
|
||||
exec_py = True
|
||||
|
||||
|
||||
@@ -3034,6 +3034,9 @@ class Interface(object):
|
||||
|
||||
continue
|
||||
|
||||
if renpy.config.log_events:
|
||||
renpy.display.log.write("%r", ev)
|
||||
|
||||
# Handle quit specially for now.
|
||||
if ev.type == pygame.QUIT:
|
||||
self.quit_event()
|
||||
|
||||
@@ -145,6 +145,9 @@ incorrectly included. This has been fixed.
|
||||
Other
|
||||
-----
|
||||
|
||||
When :var:`config.log_event` is true or RENPY_LOG_EVENTS is in the
|
||||
environment, Ren'Py will log most pygame-level events that happen.
|
||||
|
||||
When filtering text tags (with :func:`renpy.filter_text_tags` or places that
|
||||
call it), the axis tag is now handled correctly.
|
||||
|
||||
|
||||
@@ -1617,6 +1617,11 @@ Rarely or Internally Used
|
||||
shown to the user by :ref:`say <say-statement>` or :doc:`menu
|
||||
<menus>` statements will be logged to this file.
|
||||
|
||||
.. var:: config.log_events = False
|
||||
|
||||
If true, Ren'Py will log pygame-style events to the log.txt file. This will hurt performance, but might be
|
||||
useful for debugging certain problems.
|
||||
|
||||
.. var:: config.log_width = 78
|
||||
|
||||
The width of lines logged when :var:`config.log` is used.
|
||||
|
||||
@@ -53,6 +53,10 @@ The following environment variables control the behavior of Ren'Py:
|
||||
``RENPY_LESS_UPDATES``
|
||||
This causes Ren'Py to reduce the number of screen updates that occur.
|
||||
|
||||
``RENPY_LOG_EVENTS``
|
||||
If set, Ren'Py will log pygame-style events to the log.txt file. This will hurt performance, but might be
|
||||
useful for debugging certain problems.
|
||||
|
||||
``RENPY_MULTIPERSISTENT``
|
||||
The path to a directory where Ren'Py stores multipersistent data.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user