option to disable/control log messages
Hello,
Using less, one gets these messages in console on every page load: less: parsed a.less successfully. less: saving a.less to cache. less: css for a.less generated in 82ms less: css generated in 83ms
Please generate these only if specifically asked by users, even on development. I saw it's possible to do
For some, these messages are just noise.
Thanks
+1
+1
+1
Yeah that's a must. If we are debugging our javascript, LESS shouldn't spam the console. Maybe only when parsing fails. Temporary dirty fix for now:
<script>
var console_backup = console
console = { log = function(){} }
</script>
<script src="less.js"></script>
<script>
console = console_backup
</script>
Desired fix proposal:
<script>
less = {
log_level: 0
}
</script>
Where: 0 = off 1 = only errors 2 = all output
Would you like to do a pull request?
I just started looking at the less.js source today. I would like to get involved but it might take me some time. Any recommendations to get started?
Any specific questions? If so will do my best. Would be good to work on the 1.5.0-wip branch.
I've created a pull request for this: https://github.com/less/less.js/pull/1442
pulled
Has a fix for this been created yet?
@KillaCam see changelog
Thanks for this feature, only I really struggled to find documentation for this setting, then scanned the less JS file and finally found the logLevel function after a while. So for anyone looking at how to set this, within the var less options:
var less = { logLevel: 0 // No errors at all (1 displays errors only, 2 displays info (default)) };
... I really struggled to find documentation for this setting
lesscss.org -> Usage -> Using Less in the Browser -> Client side options -> logLevel
And there it is! Thanks. Was still difficult to find on the site, probably because I didn't know what to look for.