!661 modify handle log level from warn to debug

Merge pull request !661 from LiWenzhen/handlelog
This commit is contained in:
openharmony_ci 2022-08-31 10:56:10 +00:00 committed by Gitee
commit 59d5526604
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -355,11 +355,11 @@ export default class Vm {
*/
public $on(type: string, handler: Function): void {
if (typeof type !== 'string') {
Log.warn(`Invalid parameter type: The type of 'type' should be string, not ${typeof type}.`);
Log.debug(`Invalid parameter type: The type of 'type' should be string, not ${typeof type}.`);
return;
}
if (typeof handler !== 'function') {
Log.warn(`Invalid parameter type: The type of 'handler' should be function, not ${typeof handler}.`);
Log.debug(`Invalid parameter type: The type of 'handler' should be function, not ${typeof handler}.`);
return;
}
const events = this.__vmEvents;