What version of grails are you using? It's working fine for both situations for me on 1.0.4 (the latest).
I create a new blank app and created a service class with an integration test:
FooService.groovy:
class FooService {
def logSomething(message) {
log.error(message)
return true
}
}
FooServiceTests.groovy:
class FooServiceTests extends GroovyTestCase {
def fooService
void testSomething() {
assert fooService.logSomething("it works")
}
}
When running just test-app, I get the log message:
% grails test-app
Welcome to Grails 1.0.4 - http://grails.org/
....
-------------------------------------------------------
Running 1 Integration Test...
Running test FooServiceTests...
testSomething...[4174] service.FooService it works
SUCCESS
Integration Tests Completed in 440ms
-------------------------------------------------------
...
When running only integration tests, it also works:
% grails test-app -integration
Welcome to Grails 1.0.4 - http://grails.org/
....
-------------------------------------------------------
Running 1 Integration Test...
Running test FooServiceTests...
testSomething...[4444] service.FooService it works
SUCCESS
Integration Tests Completed in 481ms
-------------------------------------------------------
....
Are you munging around with the logger class (or overriding any metaclass stuff on the logger, in any previous integration classes or unit tests and not then re-initializing the metaClass?