Version 10 by hannes on 25. September 2009, 18:23
| 8 | var log = helma.logging.getLogger(__name__);getLogger(module.id); |
Version 9 by earl on 25. September 2009, 03:40
- Set useMarkdown to true
| 1 | The *helma[helma.logging module|http://githubmodule](http://github.com/hns/helma-ng/blob/master/modules/helma/logging.js* js) provides logging functionality using *Apache log4j|http://logging[Apache log4j](http://logging.apache.org/log4j/1.2/index.html*html). |
| 3 | helma.logging can be configured by passing a log4j XML or properties configuration file to the setConfig() `setConfig()` method. The default configuration is file *modules/config/log4j[modules/config/log4j.properties|http://githubproperties](http://github.com/hns/helma-ng/blob/master/modules/config/log4j.properties*properties). |
| 5 | Helma provides a special Appender class called org`org.helma.util.RhinoAppender RhinoAppender` that allows to send log messages to a Javascript *callback* function. |
| 7 | import('helma/logging'); |
| 8 | var log = helma.logging.getLogger(__name__); |
| 24 | <javascript <i>javascript stack trace>trace</i> |
| 26 | <java <i>java stack trace>trace</i> |
| 28 |
Version 8 by earl on 25. September 2009, 03:37
| 5 | Helma provides a special Appender class called org.helma.util.RhinoAppender that allows to send log messages to a Javascript *callback* function. The logging module provides the methods enableResponseLog() and disableResponseLog() to enable and disable appending of RhinoAppender log messages to a response buffer, using similar formatting as res.debug in Helma 1. |
Version 7 by earl on 25. September 2009, 03:36
| 1 | The *helma.logging module|http://devmodule|http://github.helma.org/trac/helma/browser/helma-ng/trunk/modules/helma/loggingcom/hns/helma-ng/blob/master/modules/helma/logging.js* provides logging functionality using *Apache log4j|http://logging.apache.org/log4j/1.2/index.html*. |
| 3 | helma.logging can be configured by passing a log4j XML or properties configuration file to the setConfig() method. The default configuration is file *modules/helma/log4j*modules/config/log4j.properties|http://devproperties|http://github.helma.org/trac/helma/browser/helma-ng/trunk/modules/helma/log4jcom/hns/helma-ng/blob/master/modules/config/log4j.properties*. |
Version 6 by earl on 25. September 2009, 03:34
- Set useMarkdown to
| 7 | importModule(import('helma.logging', 'logginghelma/logging'); |
| 8 | var log = helma.logging.enableResponseLog();getLogger(__name__); |
| 9 | var log = logging.getLogger('modulename'); |
Version 5 by hannes on 16. Mai 2008, 15:39
| 25 | <h3>Script Stack</h3><h4 style='padding-left: 8px; margin: 4px;'>Script Stack</h4> |
| 27 | <h3>Java Stack</h3><h4 style='padding-left: 8px; margin: 4px;'>Java Stack</h4> |
Version 4 by hannes on 16. Mai 2008, 15:27
| 22 | <div class="helma-debug-line" style="background: #fc3; color: black; border-top: 1px solid black;">3300 [pool-1-thread-2] INFO main modulename - Hello world! |
| 24 | <div class="helma-debug-line" style="background: #fc3; color: black; border-top: 1px solid black;">3303 [pool-1-thread-2] ERROR main modulename - ReferenceError: "foo" is not defined. |
Version 3 by hannes on 16. Mai 2008, 15:26
| 10 | ... |
| 11 | logThen the following code .info("log message");.. |
| 12 | |
| 13 | log.info("Hello world!"); |
| 14 | try { |
| 15 | foo.bar; |
| 16 | } catch (e) { |
| 17 | log.error(e, e.rhinoException); |
| 18 | } |
| 19 | |
| 20 | ... will produce the following output on the rendered page: |
| 21 | |
| 22 | <div class="helma-debug-line" style="background: #fc3; color: black; border-top: 1px solid black;">3300 [pool-1-thread-2] INFO main - Hello world! |
| 23 | </div> |
| 24 | <div class="helma-debug-line" style="background: #fc3; color: black; border-top: 1px solid black;">3303 [pool-1-thread-2] ERROR main - ReferenceError: "foo" is not defined. |
| 25 | <h3>Script Stack</h3> |
| 26 | <javascript stack trace> |
| 27 | <h3>Java Stack</h3> |
| 28 | <java stack trace> |
| 29 | </div> |
Version 2 by hannes on 16. Mai 2008, 11:37
| 5 | Helma provides a special Appender class called org.helma.util.RhinoAppender that allows to send log messages to a Javascript *callback* function. The logging module provides the methods startResponseLog() enableResponseLog() and stopResponseLog() disableResponseLog() to enable and disable appending of RhinoAppender log messages to a response buffer, using similar formatting as res.debug in Helma 1. |
| 8 | logging.startResponseLog();enableResponseLog(); |
Version 1 by hannes on 16. Mai 2008, 10:49
- Set tags to helma ng
| 1 | The *helma.logging module|http://dev.helma.org/trac/helma/browser/helma-ng/trunk/modules/helma/logging.js* provides logging functionality using *Apache log4j|http://logging.apache.org/log4j/1.2/index.html*. |
| 2 | |
| 3 | helma.logging can be configured by passing a log4j XML or properties configuration file to the setConfig() method. The default configuration is file *modules/helma/log4j.properties|http://dev.helma.org/trac/helma/browser/helma-ng/trunk/modules/helma/log4j.properties*. |
| 4 | |
| 5 | Helma provides a special Appender class called org.helma.util.RhinoAppender that allows to send log messages to a Javascript *callback* function. The logging module provides the methods startResponseLog() and stopResponseLog() to enable and disable appending of RhinoAppender log messages to a response buffer, using similar formatting as res.debug in Helma 1. |
| 6 | |
| 7 | importModule('helma.logging', 'logging'); |
| 8 | logging.startResponseLog(); |
| 9 | var log = logging.getLogger('modulename'); |
| 10 | ... |
| 11 | log.info("log message"); |