How to write log message

I used frappe.log(message), but does not seem to take effect.

print “message” alse not woking.


Which file are you seeing?

If you are using bench start you should see it in your console (update bench to the latest)

In production see logs/web.error.log

Don’t see logs in logs/web.error.log. I am printing logs from my custom app from hook functions.

If you are on latest, try frappe.log_error

in production. setup using easy install script. I guess thats latest only ?

on master branch and getting this exception :

Exception : 'module' object has no attribute 'log_error'

currently log_error method is available in develop branch. May be in the next Frappe release it will be made available in master.

You can track the frappe releases here.

Thanks, Makarand

how can I log in production? I checked logger file in frappe.utils and used the function accordingly. But dont see logs anywhere.