[ 3 posts ]

Khoa Bui

  • Username: khoaminhbui
  • Joined: Tue Aug 09, 2011 6:11 am
  • Posts: 127
  • Location: Vietnam
  • Twitter: khoaminhbui
  • IRC: k_bui
  • Offline
  • Profile

How to use Log

Post Posted: Sat Sep 17, 2011 9:30 am
+0-
I learn that there is a config option "filter" in YUI().use() that instruct the loader to load raw or debug version files.
My question is, in case of debug, where can I see the logged info? Is it written to log file, where the file located? Is it written to console, how can I open the console?

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 638
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: How to use Log

Post Posted: Sat Sep 17, 2011 1:33 pm
+0-
In order to turn on debug messages you need to use filter: 'debug':
Code:
YUI({ filter: 'debug' }).use()

This is by default printed to the browser console. How to open the console varies from browser to browser, but F12 is usually the way to open the developer tools.

You can also open a YUI Console, which is a Widget. The Console user guide explains how to use it and filter messages by log level.

Khoa Bui

  • Username: khoaminhbui
  • Joined: Tue Aug 09, 2011 6:11 am
  • Posts: 127
  • Location: Vietnam
  • Twitter: khoaminhbui
  • IRC: k_bui
  • Offline
  • Profile

Re: How to use Log

Post Posted: Sun Sep 18, 2011 8:15 am
+0-
Thanks Juan, I can see the log in 'debug' filter mode. But there are lot of messages, so I will manage to use 'raw' filter and add my own log only.
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum