Server side script

Hello,
Can I find the testing in server script code like we do in custom script (with console.log() method),is there any method in the server script ?

Thank you

frappe.log will show all the log in browser’s console log but only if logging is enabled in site config.

e.g. frappe.log("something")something will show up in browser’s console.

Thank you sir,
But this is giving me error that -AttributeError: module has no attribute ‘log’.

Hello, my bad just use log inside server scripts. It’s mapped to frappe.log in server scripts.

Again thank you sir,
But this is also giving me error - NameError: name ‘log’ is not defined. in version 12
and in version 13 shows nothing in browser’s console.

@Sakshi_Choudhary try :

 frappe.msgprint("test",raise_exception = False)

Thank you ,
but this is working on the static data and specific data.
And I want to console whole thing which is stored in the variable.
Or Any other Approach for the same?

@Sakshi_Choudhary do you have access to the server log ?

You can try frappe.log_error and you will find the output in error log doctype.