[ 4 posts ]

Peter Foti

  • Username: Fotiman
  • Joined: Thu Sep 17, 2009 10:09 am
  • Posts: 128
  • Offline
  • Profile

Using YUI Builder to create YUI2 modules

Post Posted: Wed Nov 10, 2010 7:39 am
+0-
I have a couple of questions in the YUI Builder forum, though I don't think that forum gets any traffic.

viewtopic.php?f=95&t=5538

When the builder attempts to remove logger messages, it takes too much with it. I can get around this by simply skipping this step, but I am curious if there is a "correct" way to write the code. That is, I am including the "logger" module in a loader, but because it attempts to remove everything up to a semicolon, it removes more than just the "logger".

Adam Moore

YUI Contributor

  • Username: adam
  • Joined: Wed Sep 03, 2008 11:16 am
  • Posts: 356
  • GitHub: apm
  • Gists: apm
  • Offline
  • Profile
Tags:

Re: Using YUI Builder to create YUI2 modules

Post Posted: Wed Nov 10, 2010 12:02 pm
+0-
There is a build property for the regex that is used to scrub log statements. The default is this:

<property name="component.logger.regex" value="^.*?(?:logger|YAHOO.log).*?(?:;|\).*;|(?:\r?\n.*?)*?\).*;).*;?.*?\r?\n" />

You could try changing this (say by removing the first part if you are exclusively using YAHOO.log). Alternatively you could work around your particular issue by doing something like "log" + "ger" in your loader requires list.

Peter Foti

  • Username: Fotiman
  • Joined: Thu Sep 17, 2009 10:09 am
  • Posts: 128
  • Offline
  • Profile

Re: Using YUI Builder to create YUI2 modules

Post Posted: Wed Nov 10, 2010 12:35 pm
+0-
I had considered both of these options. What does the YUI code do? Are there no YUI modules that include "logger" anywhere?

Adam Moore

YUI Contributor

  • Username: adam
  • Joined: Wed Sep 03, 2008 11:16 am
  • Posts: 356
  • GitHub: apm
  • Gists: apm
  • Offline
  • Profile

Re: Using YUI Builder to create YUI2 modules

Post Posted: Wed Nov 10, 2010 1:49 pm
+0-
The reason the option is there is so you can handle this situation via your build config.

We don't have this problem -- logger is needed for YUI when running the -debug versions of the files. When using the debug filter in loader, the logger is loaded automatically.
  [ 4 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