1

About environment:

  • The used framework: SAPUI5
  • version: 1.38.39
  • development environment: sap web-ide
  • reproductible with OpenUI5 v.1.38

About Issue :

Recommendation from UI5 : to don't use console.log("message")
Proposition from UI5: use jQuery.sap.log.debug("message") instead, documentation here
expected result : see the "message" in the console from chrome debugger"
actual result : Don't see the "message" in the console"

Code part :

on my controller :

onInit: function(){
  jQuery.sap.log.debug('onInit fired'); // display nothing in chrome console
  console.log('onInit fired'); // display "onInit fired" in chrome console
},

Question:

Does someone has a solution or idea for solve this problem ?

Remark:

  1. My question is probably simple, but i didn't find any solution nowhere, and I am new to UI5, so I am asking here, thank you for your help and comprehension.
  2. If someone also can tell me why this question (the only one I asked so far) lock me to ask further questions, I think the post respect this ? Thank you for your feedback
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
SylwekFr
  • 308
  • 3
  • 21

1 Answers1

1

Did you set the log level to DEBUG?
If not try to add :

jQuery.sap.log.setLevel(jQuery.sap.log.Level.DEBUG)

Also, is there any particular reason you are using 1.38 and not something more recent?

SylwekFr
  • 308
  • 3
  • 21
Johann Goltz
  • 156
  • 5
  • thank you for your reply, no i just put jQuery.sap.log.debug(), may I ask where and how generally should I set the log level ? this version is used because it was build on this version and for compability with backend :) – SylwekFr Jan 30 '20 at 10:05
  • 1
    This should work: jQuery.sap.log.setLevel(jQuery.sap.log.Level.DEBUG) – Johann Goltz Jan 30 '20 at 10:29