Skip to content

Commit 12e5154

Browse files
maxorlovskyrigor789
authored andcommitted
feat: allow suppressing renderer logs (#586)
* feat: add option to supress NS render logs * fix: typo supress -> suppress
1 parent bbaa4dc commit 12e5154

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: platform/nativescript/framework.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import NavigatorPlugin from './plugins/navigator-plugin'
66
import { setVue } from './util'
77

88
Vue.config.silent = true
9+
Vue.config.suppressRenderLogs = false
910

1011
setVue(Vue)
1112

Diff for: platform/nativescript/util/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ export function trace(message) {
7474
return infoTrace()
7575
}
7676

77-
console.log(
78-
`{NSVue (Vue: ${VUE_VERSION} | NSVue: ${NS_VUE_VERSION})} -> ${message}`
79-
)
77+
if (!_Vue.config.suppressRenderLogs) {
78+
console.log(
79+
`{NSVue (Vue: ${VUE_VERSION} | NSVue: ${NS_VUE_VERSION})} -> ${message}`
80+
)
81+
}
8082
}
8183

8284
export function before(original, thisArg, wrap) {

0 commit comments

Comments
 (0)