Where answers come from

Some pages can ask a language model questions. Set this up once; your choice is remembered in this browser for the whole site.

Model source
Use another source instead

Smallest-to-largest weight downloads. Qwen3.5 0.8B is our starting choice for page Q&A. GPU estimates are not total RAM: leave room for the browser, context and temporary buffers. Hardware changes speed and capacity; answers still need checking.

Session-only loading avoids saving model weights, uses extra RAM and downloads again after unloading. Turn it off to save downloads. Delete-data-on-exit or private browsing may impose a much smaller storage limit than the displayed estimate.

You sign in on OpenRouter; it gives this page a key for your account.

A free account does not make every model free. Choose a model with a listed :free variant; merely adding that suffix does not create one. Check free-model availability and pricing.

Chat

AI assistant, not Shawn Hartsock. It does not speak for him.

Inspect the page excerpt

Up to 4,800 characters, not the whole site. Recent conversation turns are retained within the model’s context limit.

Ask about this page, or just say hello.

Ready when you are.

Not saved or uploaded automatically. Closing keeps this conversation in this tab; changing pages starts a new one. Model replies can be wrong.

Logging in a Unit Test of a Service in Grails

Originally published .

Here’s the scenario: You’ve got a grails project and you have a simple service you’d like to test. Let’s say it’s just something like:


class MyService {

    boolean transactional = true

    def myMethod() {

         log.debug "MyService.myMethod() was called!"

    }

}

If you were to hook up a quartz job to this service and then run “grails run-app” to test your service you would see the service happily chirruping away. Now if you were using Eclipse or some other IDE you might try to write an integration test of some kind and run that test from your IDE. You’ll get an automatically generated test for that service if you used the grails commands… let’s say you edit it so the test looks like:


class MyServiceTests extends GroovyTestCase {

     void testMyMethod() {

       def myService = new MyService()

       myService.myMethod()

     }

}

Now try and run that from your IDE. The test may fail with…


groovy.lang.MissingPropertyException: No such property: log for class: MyService

… what to do?

Grails is injecting the “log” property for you. That means if you want to test that class outside of Grails you’ll need to do the same. So, you could do this:


import org.apache.log4j.*

class MyServiceTests extends GroovyTestCase {

     def myService

     def log

     void setUp() {

        // build a logger...

        BasicConfigurator.configure()

        LogManager.rootLogger.level = Level.DEBUG

        log = LogManager.getLogger("MyService")

        // use groovy metaClass to put the log into your class

        MyService.class.metaClass.getLog << {-> log}

        myService = new MyService()

     }

     void testMyMethod() {

       myService.myMethod()

     }

}

Now if you run this in your IDE you’ll see your service pleasantly chirruping away in your IDE console window.

Explore the map · Browse by topic and date