There's no way to currently have logging services and use xpcom in a separate thread. Currently the nsLoggingService::gLoggingService is initialized even before XPCOM is started. When I attempt to NS_InitXPCOM in a child thread, nsLoggingService asserts as the owning thread is not the current thread. At first glance, this may seem logical, however, let me explain what I am after, and then you might have a better understanding of the situation. I desire to use the Necko engine as my network engine. The network traffic is secondary to the application, and it should all run in the background (on a child thread simply retrieving urls on an interval basis). Because the necko engine uses other services which are not thread safe (namely the nsCategoryManager and nsAppFileLocationProvider) I must initialize XPCOM within the same thread that I intend to perform the necko operations. That means starting up XPCOM in the child thread. With the limitation that nsLoggingService starts up in the main thread, there is no way to use logging services while running XPCOM in a child thread. In addition, there is no environment variable hooked up in the build process to turn off logging. Currently, one can only disable logging if the makefile is edited to add NS_DISABLE_LOGGING and NO_BUILD_REFCNT_LOGGING
Marking NEW and adding RFE
taking some of the bugs that I have been working on from scc.
Does this bug still mean anything? I can find nsLoggingService or gLoggingService anywhere in LXR...