mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-07-19 19:43:48 -04:00
modify logger init in ark_js_vm
issue: #I4SIRR [https://gitee.com/openharmony/ark_js_runtime/issues/I4SIRR] Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "ecmascript/ecma_vm.h"
|
||||
#include "ecmascript/js_runtime_options.h"
|
||||
#include "ecmascript/napi/include/jsnapi.h"
|
||||
#include "generated/base_options.h"
|
||||
#include "include/runtime.h"
|
||||
#include "libpandabase/os/native_stack.h"
|
||||
#include "libpandabase/utils/pandargs.h"
|
||||
@@ -60,6 +61,7 @@ int Main(const int argc, const char **argv)
|
||||
BlockSignals();
|
||||
Span<const char *> sp(argv, argc);
|
||||
JSRuntimeOptions runtimeOptions(sp[0]);
|
||||
base_options::Options baseOptions(sp[0]);
|
||||
|
||||
panda::PandArg<bool> help("help", false, "Print this message and exit");
|
||||
panda::PandArg<bool> options("options", false, "Print compiler and runtime options");
|
||||
@@ -70,6 +72,7 @@ int Main(const int argc, const char **argv)
|
||||
panda::PandArgParser paParser;
|
||||
|
||||
runtimeOptions.AddOptions(&paParser);
|
||||
baseOptions.AddOptions(&paParser);
|
||||
|
||||
paParser.Add(&help);
|
||||
paParser.Add(&options);
|
||||
@@ -89,6 +92,8 @@ int Main(const int argc, const char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
Logger::Initialize(baseOptions);
|
||||
|
||||
arg_list_t arguments = paParser.GetRemainder();
|
||||
|
||||
if (runtimeOptions.IsStartupTime()) {
|
||||
|
||||
Reference in New Issue
Block a user