-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
49 lines (30 loc) · 1.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Abstract
--------
This program adds the ability of logging to a file the debug and error messages produced by GnomeShell and its extensions.
The log file is written in /tmp/gshell.log by default, but you can change this and other options editing the file logger.js
Credits
-------
- The log4javascript library was written by Tim Down and is licensed under the terms of the Apache License, Version 2.0.
- The files log4javascript_file_appender.js and log4javascript_gjs_appender.js was written by Tim Cuthbertson
and are licensed under the terms of the GNU General Public License version 3 or later.
- The file logger.js was written by Antonio Hernández and is licensed under the terms of the GNU General Public License
version 2 or later.
Installation and usage
----------------------
The program is intended to be used as a GnomeShell module, so you must copy the logger directory under
/usr/share/gnome-shell/js/ and include the module in main.js with this line:
const Logger = imports.logger.logger;
All the messages sent to the default Gnome Shell logger, that is, calling global.log(), will also be send to
log4javascript.
You can also use the logger directly by calling the following methods:
global.logger.debug()
global.logger.info()
global.logger.warn()
global.logger.error()
global.logger.fatal()
Tip: If you want to see the messages produced by Gjs in gshell.log you can start GnomeShell this way from a tty:
DISPLAY=:0 gnome-shell --replace 2&>>/tmp/gshell.log
License
-------
This project is licensed under the terms of the GPL v2.0,
see http://www.gnu.org/licenses/gpl-2.0.html