WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=ed09316649014e56d3137d98cd41d8b2b58116d5

commit ed09316649014e56d3137d98cd41d8b2b58116d5
Author: Lauro Moura <lauromo...@expertisesolutions.com.br>
Date:   Wed Dec 2 11:07:50 2015 -0800

    Wiki page logging changed with summary [] by Lauro Moura
---
 pages/api/javascript/eina/logging.txt | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/pages/api/javascript/eina/logging.txt 
b/pages/api/javascript/eina/logging.txt
index 5e92631..af49922 100644
--- a/pages/api/javascript/eina/logging.txt
+++ b/pages/api/javascript/eina/logging.txt
@@ -80,12 +80,12 @@ var colorDisabled = efl.getLogColorDisable();
 
 Determines whether colors are disabled in the log messages.
 
-=== getLogDomainLevel(domainname) ===
+=== getLogDomainLevel(domain) ===
 
 Syntax
 
 <code javascript>
-var level = efl.getLogDomainLevel(domainname);
+var level = efl.getLogDomainLevel(domain);
 </code>
 
 Gets the domain level given its name. If the domain was not yet registered 
through ''efl.registerLogDomain'' but is pending after a previous 
''efl.setLogDomainLevel'' call or the environment variable ''EINA_LOG_LEVELS'', 
the respective value is returned. If nothing else was found, the default level 
from ''efl.getLogLevel'' is returned.
@@ -95,7 +95,7 @@ Gets the domain level given its name. If the domain was not 
yet registered throu
 Syntax
 
 <code javascript>
-var level = efl.getLogDomainRegisteredLevel(domainname);
+var level = efl.getLogDomainRegisteredLevel(domain);
 </code>
 
 Gets the level for the given domain. Works much faster than 
''efl.getLogDomainLevel'' but relies on the domain being previously registered 
with ''efl.registerLogDomain''.
@@ -228,7 +228,7 @@ function callback(){...}
 efl.setLogPrintCb(callback);
 </code>
 
-Sets the callback that will be called whenever a log command that would be 
executed, i.e., above or equal to the current log level. It receives as 
arguments the domain, output color, level, filename, function and line number 
of the call, and finally the message. It allows further customization of the 
output.
+Sets the callback that will be called whenever a log command would be 
executed, i.e., above or equal to the current log level, is called. It receives 
as arguments the domain, output color, level, filename, function and line 
number of the call, and finally the message. It allows further customization of 
the output.
 
 <note important>
 If not set, EFL defaults the output to the standard error output, like this:
@@ -236,4 +236,23 @@ If not set, EFL defaults the output to the standard error 
output, like this:
 ''CRI<30206>: /home/user/dev/myapp/main.js:254 () MessageFrom logPrint''
 </note>
 
+Example usage
+
+<code javascript>
+function mycallback(domain, color, level, filename function, line, message) {
+    // Save log to file, print, etc.
+}
+
+efl.setLogPrintCb(callback);
+efl.logCritical("Kaboom"); // Calls mycallback if efl.LOG_LEVEL_CRITICAL is a 
triggering level.
+</code>
+
 === unregisterLogDomain(...) ===
+
+Syntax
+
+<code javascript>
+efl.unregisterDomain(domain);
+</code>
+
+Forgets about a logging domain registered from ''efl.registerLogDomain''.
\ No newline at end of file

-- 


Reply via email to