Page tree
Skip to end of metadata
Go to start of metadata

Enabling logging

To enable logging in FireBreath, both for your own messages and the ones FireBreath generates, you need to do the following:

  1. add the following to your PluginConfig.cmake

  2. regenerate your project using the prep* scripts
  3. open up Factory.cpp in your project. You need to define the following function inside the class definition for PluginFactory:

  4. FireBreath will now log to the specified output. You can add your own log messages, by using the FBLOG_* macros that can be found in firebreath/src/ScriptingCore/logging.h.

About log levels

The log levels are defined in firebreath/src/ScriptingCore/logging.h:

By default the log level is Info, meaning Trace and Debug messages will not be emitted.

If you want to change the log level, you need to define the following inside the class definition for PluginFactory:


On Mac OS X launching a web browser from the GUI will make stdout, and hence your console log messages, go to /var/log/system.log.

On Windows, LogMethod_Console logs to the system debug console.  This can be accessed with a tool such as Sysinternal's Debug View.

  • No labels


  1. use log4cplus FB::Log::LogMethod_File write log to file with unicode std::wstring must add

    outMethods.push_back(std::make_pair(FB::Log::LogMethod_File, "/foo/bar/baz.log"));

    std::locale::global(std::locale("", std::locale::all ^ std::locale::numeric)); //support unicode and number has not a comma

    if add like std::locale::global(std::locale("chs"));  will get an error

    ReferenceError: invalid assignment left-hand side  window.__FB_CALL_314,458,564 = function(delay, f, args, fname) {   if (arguments...

    from browser console

    can't alert pop-up window plugin loaded!

    Is there a better suggestion?


    1. This is not the place to ask for help.  Ask for help on the google group (firebreath-dev) or on