Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Log4j2 to logging.dsld
- Loading branch information
1 parent
350be3b
commit 594e91b
Showing
7 changed files
with
175 additions
and
224 deletions.
There are no files selected for viewing
55 changes: 23 additions & 32 deletions
55
base/org.codehaus.groovy18/plugin_dsld_support/dsld/logging.dsld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
/* | ||
* Copyright 2011 SpringSource and others | ||
* Copyright 2009-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Hackergarten contribution | ||
* | ||
* @author Lukasz Pielak | ||
* @author Max Rydahl Andersen | ||
* @author Tom Bujok (reficio.org) | ||
* @author Andres Almiray | ||
*/ | ||
package dsld | ||
|
||
[ | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
logger: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
logger: 'org.slf4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
logger: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
logger: 'org.apache.log4j.Logger' | ||
] | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
loggerType: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
loggerType: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
loggerType: 'org.apache.log4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
loggerType: 'org.slf4j.Logger' | ||
] | ||
].each { data -> | ||
contribute(currentType(annotations: annotatedBy(data.annotation))) { | ||
for(annotationNode in annotations) { | ||
provider = 'Logging AST Transformations' | ||
def name = annotationNode.getMember('value') ?: 'log' | ||
property name: name, | ||
type: data.logger | ||
} | ||
provider = 'Logging AST Transform' | ||
for (annotationNode in annotations) { | ||
def loggerName = annotationNode.getMember('value') ?: 'log' | ||
property name: loggerName, type: data.loggerType, isStatic: true // also final, private, transient | ||
} | ||
} | ||
} |
55 changes: 23 additions & 32 deletions
55
base/org.codehaus.groovy20/plugin_dsld_support/dsld/logging.dsld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
/* | ||
* Copyright 2011 SpringSource and others | ||
* Copyright 2009-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Hackergarten contribution | ||
* | ||
* @author Lukasz Pielak | ||
* @author Max Rydahl Andersen | ||
* @author Tom Bujok (reficio.org) | ||
* @author Andres Almiray | ||
*/ | ||
package dsld | ||
|
||
[ | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
logger: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
logger: 'org.slf4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
logger: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
logger: 'org.apache.log4j.Logger' | ||
] | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
loggerType: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
loggerType: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
loggerType: 'org.apache.log4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
loggerType: 'org.slf4j.Logger' | ||
] | ||
].each { data -> | ||
contribute(currentType(annotations: annotatedBy(data.annotation))) { | ||
for(annotationNode in annotations) { | ||
provider = 'Logging AST Transformations' | ||
def name = annotationNode.getMember('value') ?: 'log' | ||
property name: name, | ||
type: data.logger | ||
} | ||
provider = 'Logging AST Transform' | ||
for (annotationNode in annotations) { | ||
def loggerName = annotationNode.getMember('value') ?: 'log' | ||
property name: loggerName, type: data.loggerType, isStatic: true // also final, private, transient | ||
} | ||
} | ||
} |
55 changes: 23 additions & 32 deletions
55
base/org.codehaus.groovy21/plugin_dsld_support/dsld/logging.dsld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
/* | ||
* Copyright 2011 SpringSource and others | ||
* Copyright 2009-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Hackergarten contribution | ||
* | ||
* @author Lukasz Pielak | ||
* @author Max Rydahl Andersen | ||
* @author Tom Bujok (reficio.org) | ||
* @author Andres Almiray | ||
*/ | ||
package dsld | ||
|
||
[ | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
logger: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
logger: 'org.slf4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
logger: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
logger: 'org.apache.log4j.Logger' | ||
] | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
loggerType: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
loggerType: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
loggerType: 'org.apache.log4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
loggerType: 'org.slf4j.Logger' | ||
] | ||
].each { data -> | ||
contribute(currentType(annotations: annotatedBy(data.annotation))) { | ||
for(annotationNode in annotations) { | ||
provider = 'Logging AST Transformations' | ||
def name = annotationNode.getMember('value') ?: 'log' | ||
property name: name, | ||
type: data.logger | ||
} | ||
provider = 'Logging AST Transform' | ||
for (annotationNode in annotations) { | ||
def loggerName = annotationNode.getMember('value') ?: 'log' | ||
property name: loggerName, type: data.loggerType, isStatic: true // also final, private, transient | ||
} | ||
} | ||
} |
59 changes: 27 additions & 32 deletions
59
base/org.codehaus.groovy22/plugin_dsld_support/dsld/logging.dsld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,47 @@ | ||
/* | ||
* Copyright 2011 SpringSource and others | ||
* Copyright 2009-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Hackergarten contribution | ||
* | ||
* @author Lukasz Pielak | ||
* @author Max Rydahl Andersen | ||
* @author Tom Bujok (reficio.org) | ||
* @author Andres Almiray | ||
*/ | ||
package dsld | ||
|
||
[ | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
logger: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
logger: 'org.slf4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
logger: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
logger: 'org.apache.log4j.Logger' | ||
] | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
loggerType: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
loggerType: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
loggerType: 'org.apache.log4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j2', | ||
loggerType: 'org.apache.logging.log4j.core.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
loggerType: 'org.slf4j.Logger' | ||
] | ||
].each { data -> | ||
contribute(currentType(annotations: annotatedBy(data.annotation))) { | ||
for(annotationNode in annotations) { | ||
provider = 'Logging AST Transformations' | ||
def name = annotationNode.getMember('value') ?: 'log' | ||
property name: name, | ||
type: data.logger | ||
} | ||
provider = 'Logging AST Transform' | ||
for (annotationNode in annotations) { | ||
def loggerName = annotationNode.getMember('value') ?: 'log' | ||
property name: loggerName, type: data.loggerType, isStatic: true // also final, private, transient | ||
} | ||
} | ||
} |
59 changes: 27 additions & 32 deletions
59
base/org.codehaus.groovy23/plugin_dsld_support/dsld/logging.dsld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,47 @@ | ||
/* | ||
* Copyright 2011 SpringSource and others | ||
* Copyright 2009-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Hackergarten contribution | ||
* | ||
* @author Lukasz Pielak | ||
* @author Max Rydahl Andersen | ||
* @author Tom Bujok (reficio.org) | ||
* @author Andres Almiray | ||
*/ | ||
package dsld | ||
|
||
[ | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
logger: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
logger: 'org.slf4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
logger: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
logger: 'org.apache.log4j.Logger' | ||
] | ||
[ | ||
annotation: 'groovy.util.logging.Log', | ||
loggerType: 'java.util.logging.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Commons', | ||
loggerType: 'org.apache.commons.logging.Log' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j', | ||
loggerType: 'org.apache.log4j.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Log4j2', | ||
loggerType: 'org.apache.logging.log4j.core.Logger' | ||
], | ||
[ | ||
annotation: 'groovy.util.logging.Slf4j', | ||
loggerType: 'org.slf4j.Logger' | ||
] | ||
].each { data -> | ||
contribute(currentType(annotations: annotatedBy(data.annotation))) { | ||
for(annotationNode in annotations) { | ||
provider = 'Logging AST Transformations' | ||
def name = annotationNode.getMember('value') ?: 'log' | ||
property name: name, | ||
type: data.logger | ||
} | ||
provider = 'Logging AST Transform' | ||
for (annotationNode in annotations) { | ||
def loggerName = annotationNode.getMember('value') ?: 'log' | ||
property name: loggerName, type: data.loggerType, isStatic: true // also final, private, transient | ||
} | ||
} | ||
} |
Oops, something went wrong.