Gitweb links:

...log 
http://git.netsurf-browser.org/nsgenbind.git/shortlog/9656f1ff87136263d44a54a4e3081ac92ad3b699
...commit 
http://git.netsurf-browser.org/nsgenbind.git/commit/9656f1ff87136263d44a54a4e3081ac92ad3b699
...tree 
http://git.netsurf-browser.org/nsgenbind.git/tree/9656f1ff87136263d44a54a4e3081ac92ad3b699

The branch, master has been updated
       via  9656f1ff87136263d44a54a4e3081ac92ad3b699 (commit)
      from  9298fea93f101a417bbd15a879f319fcdcf41cf0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/nsgenbind.git/commit/?id=9656f1ff87136263d44a54a4e3081ac92ad3b699
commit 9656f1ff87136263d44a54a4e3081ac92ad3b699
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    DUKKY: Switch to using NSLOG rather than old LOG or JS_LOG
    
    Also use the `dukky` logging category so that we have better
    separation of log messages regarding Duktape
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index bb506c8..b3c9f19 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -151,7 +151,7 @@ output_dump_stack(FILE* outf)
         if (options->dbglog) {
                 /* dump stack */
                 fprintf(outf, "\tduk_push_context_dump(ctx);\n");
-                fprintf(outf, "\tLOG(\"Stack: %%s\", duk_to_string(ctx, 
-1));\n");
+                fprintf(outf, "\tNSLOG(dukky, INFO, \"Stack: %%s\", 
duk_to_string(ctx, -1));\n");
                 fprintf(outf, "\tduk_pop(ctx);\n");
         }
         return 0;
@@ -255,7 +255,7 @@ output_get_method_private(FILE* outf, char *class_name)
         fprintf(outf, "\tduk_pop_2(ctx);\n");
         fprintf(outf, "\tif (priv == NULL) {\n");
         if (options->dbglog) {
-                fprintf(outf, "\t\tLOG(\"priv failed\");\n");
+                fprintf(outf, "\t\tNSLOG(dukky, INFO, \"priv failed\");\n");
         }
         fprintf(outf, "\t\treturn 0; /* can do? No can do. */\n");
         fprintf(outf, "\t}\n\n");
@@ -513,7 +513,7 @@ output_interface_init(FILE* outf,
         /* generate log statement */
         if (options->dbglog) {
                 fprintf(outf,
-                        "\tLOG(\"Initialise %%p (priv=%%p)\", 
duk_get_heapptr(ctx, 0), priv);\n" );
+                        "\tNSLOG(dukky, INFO, \"Initialise %%p (priv=%%p)\", 
duk_get_heapptr(ctx, 0), priv);\n" );
         }
 
         /* output the initaliser code from the binding */
@@ -550,7 +550,7 @@ output_interface_fini(FILE* outf,
         /* generate log statement */
         if (options->dbglog) {
                 fprintf(outf,
-                        "\tLOG(\"Finalise %%p\", duk_get_heapptr(ctx, 0));\n" 
);
+                        "\tNSLOG(dukky, INFO, \"Finalise %%p\", 
duk_get_heapptr(ctx, 0));\n" );
         }
 
         /* output the finialisor code from the binding */
@@ -1163,7 +1163,7 @@ output_interface_operation(FILE* outf,
                      interfacee->name, operatione->name);
 
                 if (options->dbglog) {
-                        fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                        fprintf(outf, "\tNSLOG(dukky, WARNING, 
\"Unimplemented\");\n" );
                 }
 
                 fprintf(outf,"\treturn 0;\n");
@@ -1248,7 +1248,7 @@ output_attribute_getter(FILE* outf,
              type_str);
 
         if (options->dbglog) {
-                fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                fprintf(outf, "\tNSLOG(dukky, WARNING, \"Unimplemented\");\n" 
);
         }
 
         fprintf(outf,
@@ -1345,7 +1345,7 @@ output_attribute_setter(FILE* outf,
                      atributee->name,
                      type_str);
                 if (options->dbglog) {
-                        fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                        fprintf(outf, "\tNSLOG(dukky, WARNING, 
\"Unimplemented\");\n" );
                 }
 
                 /* no implementation so generate default */
diff --git a/src/duk-libdom.c b/src/duk-libdom.c
index 96b11d5..a04ee7d 100644
--- a/src/duk-libdom.c
+++ b/src/duk-libdom.c
@@ -443,7 +443,7 @@ output_binding_src(struct ir *ir)
                 "\tduk_push_object(ctx);\n"
                 "\tif ((ret = duk_safe_call(ctx, genproto, NULL, 1, 1)) != 
DUK_EXEC_SUCCESS) {\n"
                 "\t\tduk_pop(ctx);\n"
-                "\t\tLOG(\"Failed to register prototype for %%s\", proto_name 
+ 2);\n"
+                "\t\tNSLOG(dukky, WARNING, \"Failed to register prototype for 
%%s\", proto_name + 2);\n"
                 "\t\treturn ret;\n"
                 "\t}\n"
                 "\t/* top of stack is the ready prototype, inject it */\n"


-----------------------------------------------------------------------

Summary of changes:
 src/duk-libdom-interface.c |   14 +++++++-------
 src/duk-libdom.c           |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index bb506c8..b3c9f19 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -151,7 +151,7 @@ output_dump_stack(FILE* outf)
         if (options->dbglog) {
                 /* dump stack */
                 fprintf(outf, "\tduk_push_context_dump(ctx);\n");
-                fprintf(outf, "\tLOG(\"Stack: %%s\", duk_to_string(ctx, 
-1));\n");
+                fprintf(outf, "\tNSLOG(dukky, INFO, \"Stack: %%s\", 
duk_to_string(ctx, -1));\n");
                 fprintf(outf, "\tduk_pop(ctx);\n");
         }
         return 0;
@@ -255,7 +255,7 @@ output_get_method_private(FILE* outf, char *class_name)
         fprintf(outf, "\tduk_pop_2(ctx);\n");
         fprintf(outf, "\tif (priv == NULL) {\n");
         if (options->dbglog) {
-                fprintf(outf, "\t\tLOG(\"priv failed\");\n");
+                fprintf(outf, "\t\tNSLOG(dukky, INFO, \"priv failed\");\n");
         }
         fprintf(outf, "\t\treturn 0; /* can do? No can do. */\n");
         fprintf(outf, "\t}\n\n");
@@ -513,7 +513,7 @@ output_interface_init(FILE* outf,
         /* generate log statement */
         if (options->dbglog) {
                 fprintf(outf,
-                        "\tLOG(\"Initialise %%p (priv=%%p)\", 
duk_get_heapptr(ctx, 0), priv);\n" );
+                        "\tNSLOG(dukky, INFO, \"Initialise %%p (priv=%%p)\", 
duk_get_heapptr(ctx, 0), priv);\n" );
         }
 
         /* output the initaliser code from the binding */
@@ -550,7 +550,7 @@ output_interface_fini(FILE* outf,
         /* generate log statement */
         if (options->dbglog) {
                 fprintf(outf,
-                        "\tLOG(\"Finalise %%p\", duk_get_heapptr(ctx, 0));\n" 
);
+                        "\tNSLOG(dukky, INFO, \"Finalise %%p\", 
duk_get_heapptr(ctx, 0));\n" );
         }
 
         /* output the finialisor code from the binding */
@@ -1163,7 +1163,7 @@ output_interface_operation(FILE* outf,
                      interfacee->name, operatione->name);
 
                 if (options->dbglog) {
-                        fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                        fprintf(outf, "\tNSLOG(dukky, WARNING, 
\"Unimplemented\");\n" );
                 }
 
                 fprintf(outf,"\treturn 0;\n");
@@ -1248,7 +1248,7 @@ output_attribute_getter(FILE* outf,
              type_str);
 
         if (options->dbglog) {
-                fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                fprintf(outf, "\tNSLOG(dukky, WARNING, \"Unimplemented\");\n" 
);
         }
 
         fprintf(outf,
@@ -1345,7 +1345,7 @@ output_attribute_setter(FILE* outf,
                      atributee->name,
                      type_str);
                 if (options->dbglog) {
-                        fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+                        fprintf(outf, "\tNSLOG(dukky, WARNING, 
\"Unimplemented\");\n" );
                 }
 
                 /* no implementation so generate default */
diff --git a/src/duk-libdom.c b/src/duk-libdom.c
index 96b11d5..a04ee7d 100644
--- a/src/duk-libdom.c
+++ b/src/duk-libdom.c
@@ -443,7 +443,7 @@ output_binding_src(struct ir *ir)
                 "\tduk_push_object(ctx);\n"
                 "\tif ((ret = duk_safe_call(ctx, genproto, NULL, 1, 1)) != 
DUK_EXEC_SUCCESS) {\n"
                 "\t\tduk_pop(ctx);\n"
-                "\t\tLOG(\"Failed to register prototype for %%s\", proto_name 
+ 2);\n"
+                "\t\tNSLOG(dukky, WARNING, \"Failed to register prototype for 
%%s\", proto_name + 2);\n"
                 "\t\treturn ret;\n"
                 "\t}\n"
                 "\t/* top of stack is the ready prototype, inject it */\n"


-- 
NetSurf Generator for JavaScript bindings

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to