added writeLog method for logger widget for easier extend and write