mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
Add some tests for IgnoreFiles
And log error on invalid regexp. See #1189
This commit is contained in:
parent
beaa1b3aad
commit
beeae6ab69
3 changed files with 33 additions and 18 deletions
|
@ -198,12 +198,12 @@ func NewDistinctErrorLogger() *DistinctErrorLogger {
|
|||
}
|
||||
|
||||
// Avoid spamming the logs with errors
|
||||
var deprecatedLogger = NewDistinctErrorLogger()
|
||||
var DistinctErrorLog = NewDistinctErrorLogger()
|
||||
|
||||
// Deprecated logs ERROR logs about a deprecation, but only once for a given set of arguments' values.
|
||||
func Deprecated(object, item, alternative string) {
|
||||
// deprecatedLogger.Printf("%s's %s is deprecated and will be removed in Hugo %s. Use %s instead.", object, item, NextHugoReleaseVersion(), alternative)
|
||||
deprecatedLogger.Printf("%s's %s is deprecated and will be removed VERY SOON. Use %s instead.", object, item, alternative)
|
||||
DistinctErrorLog.Printf("%s's %s is deprecated and will be removed VERY SOON. Use %s instead.", object, item, alternative)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue