зеркало из https://github.com/mozilla/Negatus.git
logging enabled on B2G phones by default
This commit is contained in:
Родитель
1d23ad22c7
Коммит
4195e369b9
3
run.sh
3
run.sh
|
@ -9,4 +9,5 @@ $ADB push agent /data/local
|
|||
$ADB push libs/libnspr4.so /data/local
|
||||
$ADB push libs/libplc4.so /data/local
|
||||
$ADB push libs/libplds4.so /data/local
|
||||
$ADB shell "LD_LIBRARY_PATH=/data/local /data/local/agent"
|
||||
$ADB shell 'export NSPR_LOG_MODULES="NegatusLOG:5, timestamp" \
|
||||
&& LD_LIBRARY_PATH=/data/local /data/local/agent'
|
||||
|
|
|
@ -776,7 +776,7 @@ CommandEventHandler::do_rmdr(std::string path, std::ostringstream &out)
|
|||
std::string
|
||||
CommandEventHandler::testroot(std::vector<std::string>& args)
|
||||
{
|
||||
return std::string("/data/local");
|
||||
return std::string(TESTROOT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
#include "BufferedSocket.h"
|
||||
#include "EventHandler.h"
|
||||
|
||||
|
||||
#define TESTROOT "/data/local"
|
||||
|
||||
|
||||
class CommandEventHandler: public EventHandler
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -4,15 +4,20 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#define DEBUG
|
||||
#include "CommandEventHandler.h"
|
||||
#include "Logger.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
Logger* Logger::mInstance = NULL;
|
||||
PRLogModuleInfo* Logger::logModule = NULL;
|
||||
|
||||
Logger::Logger()
|
||||
{
|
||||
logModule = PR_NewLogModule("NegatusLOG");
|
||||
PR_SetLogFile("Negatus.log");
|
||||
std::string log_path = std::string(TESTROOT) + "/Negatus.log";
|
||||
PR_SetLogFile(log_path.c_str());
|
||||
PR_LOG(logModule, PR_LOG_ALWAYS, ("NegatusLOG init.\n"));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче