mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-10-07 16:33:53 +00:00
Description:fix js log cannot print bug Sig: SIG_ApplicationFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: liqiang <liqiang121@huawei.com> Change-Id: I6e59376798072e29a91bb3efb2d07aa64f3da98a
This commit is contained in:
parent
3eb5f8f014
commit
3bda96cc9c
@ -23,6 +23,9 @@
|
||||
namespace OHOS {
|
||||
namespace AbilityRuntime {
|
||||
namespace {
|
||||
static const uint32_t JS_CONSOLE_LOG_DOMAIN = 0xFEFE;
|
||||
static const char* JS_CONSOLE_LOG_TAG = "JsApp";
|
||||
|
||||
std::string MakeLogContent(NativeCallbackInfo& info)
|
||||
{
|
||||
std::string content;
|
||||
@ -67,7 +70,7 @@ NativeValue* ConsoleLog(NativeEngine* engine, NativeCallbackInfo* info)
|
||||
}
|
||||
|
||||
std::string content = MakeLogContent(*info);
|
||||
HiLogPrint(LOG_APP, LEVEL, AMS_LOG_DOMAIN, "JsApp", "%{public}s", content.c_str());
|
||||
HiLogPrint(LOG_APP, LEVEL, JS_CONSOLE_LOG_DOMAIN, JS_CONSOLE_LOG_TAG, "%{public}s", content.c_str());
|
||||
|
||||
return engine->CreateUndefined();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user