Enabling logging
To enable logging in FireBreath, both for your own messages and the ones FireBreath generates, you need to do the following:
add the following to your PluginConfig.cmake
- regenerate your project using the
prep*scripts open up Factory.cpp in your project. You need to define the following function inside the class definition for PluginFactory:
FireBreath will now log to the specified output. You can add your own log messages, by using the
FBLOG_*macros that can be found infirebreath/src/ScriptingCore/logging.h.
Example:
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:
Caveats
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.
2 Comments
Hide/Show CommentsApr 26, 2013
lindaojiang
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?
Apr 26, 2013
Richard Bateman
This is not the place to ask for help. Ask for help on the google group (firebreath-dev) or on stackoverflow.com