[gtk+/wip/alexl/broadway4] broadway: Improve logging
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/alexl/broadway4] broadway: Improve logging
- Date: Thu, 30 Nov 2017 17:06:12 +0000 (UTC)
commit df7cba92c1a4ae9929140dd34c5083029b53425e
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 30 14:47:08 2017 +0100
broadway: Improve logging
We now log backwards, so that the latest is always visible.
Also, we use <pre> with a smaller size.
gdk/broadway/broadway.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index 5474960..4e15ecd 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -2,13 +2,14 @@
var logDiv = null;
function log(str) {
if (!logDiv) {
- logDiv = document.createElement('div');
+ logDiv = document.createElement('pre');
document.body.appendChild(logDiv);
logDiv.style["position"] = "absolute";
logDiv.style["right"] = "0px";
+ logDiv.style["font-size"] = "small";
}
- logDiv.appendChild(document.createTextNode(str));
- logDiv.appendChild(document.createElement('br'));
+ logDiv.insertBefore(document.createElement('br'), logDiv.firstChild);
+ logDiv.insertBefore(document.createTextNode(str), logDiv.firstChild);
}
function getStackTrace()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]