Console.log not working from a frame script

sorry for such a basic question but my strings sent with console.log from
the frame script are not displayed any more in the browser console when I
restart Nightly.

I have no error msg and the code seems to work but the message from the
browser script only are given in the console… Have I change an option ?
Thanks
F.

Try importing this first into your framescript:

Cu.import('resource://gre/modules/devtools/Console.jsm');

I add this at the top of the file
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import(‘resource://gre/modules/Console.jsm’);
but the console.log() are still silent.
I could revert to my old logging function
LOG: function(msg){ var consoleService = Components.classes["@
mozilla.org/consoleservice;1
"].getService(Components.interfaces.nsIConsoleService);
consoleService.logStringMessage(msg);
},
which is still working, but the console.log command were displayed in an
other color then the msg from the browser script. That was usefull…

François

Is this something which just changed in recent versions of nightly? It works for me and I’m not aware of any very recent changes to this bit of code, although it was changed heavily the back end of last year.

It works for me as well in nightly and beta. I’m not sure what’s going on.

Maybe your preference of extensions.sdk.console.logLevel? I’m not sure it would affect framescript but this is really weird - https://github.com/Noitidart/DevPrefs/pull/3

It stops working a few days ago. I don’t see
extensions.sdk.console.logLevel preference in my about:config tab
F.