This question has been flagged
1 Reply
2561 Views

I have created the following class with a function in it. When I call the function with a button nothing is written to the openerp log, either an error or what I want the function to write. What am i doing wrong?

class database_function(osv.osv_memory):
    _name = "database.function"
    _description = "Database Functions"
    _logger = logging.getLogger(__name__)
    _columns = {
    }

    _defaults = {
    }

    def action_button_database_sync(self, cr, uid, ids, context=None):
            _logger.warning("this is a warning")
            _logger.info("this is info")
        return res

database_function()
Avatar
Discard
Best Answer

Hello,

Late answer for bookmark :-):
Could try :
self._logger.info("this is info")

For replacing some variable :

self._logger.info("this is info %s",variable)


 

 

Avatar
Discard