Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin scans grails plugins and warnings cannot be surpressed from startup logs #11

Open
alanmosely opened this issue Jul 8, 2014 · 5 comments

Comments

@alanmosely
Copy link

Hi, thanks for the excellent plugin, we are currently facing two issues that are dirtying our production logs on startup.

The first issue is that the plugin is scanning some js from various grails resources/plugins and I don't see how we can exclude them, for example:

Jul 08, 2014 2:11:52 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: C:\Users\xxx\Work\xxx\target\work\tomcat\work\Tomcat\localhost\xxx\grails-resources\avatar-picker\lib\fd-slider\fd-slider.js:1261:      WARNING - Parse error. Non-JSDoc comment has annotations. Did you mean to start it with '/**'?
    /*@if (@_jscript_version < 9)
^

Jul 08, 2014 2:11:52 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s)
Jul 08, 2014 2:11:53 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING:     C:\Users\xxx\Work\xxx\target\work\tomcat\work\Tomcat\localhost\xxx\grails-resources\plugins\console-1.2\js\jquery.layout.js:4078: WARNING - Parse error. Non-JSDoc comment has annotations. Did you mean to start it with '/**'?
    /*
^

Jul 08, 2014 2:11:53 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s)
Jul 08, 2014 2:11:56 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: C:\Users\xxx\Work\xxx\target\work\tomcat\work\Tomcat\localhost\xxx\grails-resources\plugins\spring-security-ui-1.0-RC1\js\jquery\jquery.checkbox.js:10:   WARNING - Parse error. illegal use of unknown JSDoc tag "mailto"; ignoring it
 * @mailto wm.morgun@gmail.com
   ^

The second issue is that although we can surpress these warnings when in dev using:
log4j = {
error 'com.google.javascript.jscomp',
'org.grails.plugin.resource.mapper.googleclosurecompiler'
}

When building a prod war and specifying grails.logging.jul.usebridge = false (for performance reasons) the working log4j config above seems to be ignored and I've found no way of surpressing the irrelevant warnings that are shown whenever our prod webapp is started up.

@oyvinmar
Copy link
Owner

oyvinmar commented Aug 8, 2014

Sorry for the late response. I've been on holiday the last weeks.

I don't have any suggestion on how to suppress the warnings. This seems like an issue that is not directly linked to the plugin.

@alanmosely
Copy link
Author

Well there are two things here:

  • Will you be adding support to exclude certain files anytime soon?
  • Can you add an option that would suppress all plugin logging except for errors?

@oyvinmar
Copy link
Owner

I haven't tested it but you should be able to exclude certain files with grails.resources.googleclosurecompiler.exludes = ['**/*.min.js', 'filetoskip.js'] in your config.

See: http://grails-plugins.github.io/grails-resources/guide/6.%20Creating%20custom%20mappers.html#6.4%20Processing%20only%20the%20right%20types%20of%20files for more info.

@alanmosely
Copy link
Author

Unfortunately that doesn't work, I tried both:
grails.resources.googleclosurecompiler.exludes
grails.resources.mappers.googleclosurecompiler.exludes

@demon101
Copy link

demon101 commented Mar 5, 2015

for me works in this way
grails.resources.mappers.googleclosurecompiler.excludes = ['**/*.min.js', '**/jquery.touchSwipe.js']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants