opendolphin

Server-side logging in Server Mode


In the demo dolphin apps using the "InMemoryConfig" setups, both client and server messages pop up in the terminal, e.g.:

...
[INFO] C:           -> Command: AttributeCreated attr:15C, pm:dataMold, property:Matches(FIFA) value:FIFA matches qualifier:null tag:LABEL
[INFO] C:           -> Command: AttributeCreated attr:16C, pm:dataMold, property:Matches(RSSSF) value:false qualifier:null tag:ENABLED
[INFO] C:           -> Command: AttributeCreated attr:17C, pm:dataMold, property:Matches(RSSSF) value:RSSSF matches qualifier:null tag:LABEL
[INFO] S:     received Command: CreatePresentationModel pmId dataMold pmType null  attributes [[propertyName:Name, id:0C, qualifier:null, value:null, baseValue:null,     tag:VALUE], [propertyName:Rank, id:1C, qualifier:null, value:null, baseValue:null, tag:VALUE], [propertyName:YearOfBirth, id:2C, qualifier:null, value:null, baseValue:null, tag:VALUE], [propertyName:Country, id:3C, qualifier:null, value:null, baseValue:null, tag:VALUE], [propertyName:Matches(FIFA), id:4C, qualifier:null, value:null, baseValue:null, tag:VALUE], [propertyName:Matches(RSSSF), id:5C, qualifier:null, value:null, baseValue:null, tag:VALUE]]
[INFO] S:     received Command: AttributeCreated attr:6C, pm:dataMold, property:Name value:false qualifier:null tag:ENABLED
...

In client/server mode, the client side prints all the messages as usual (prefixed with [C]), but the server is dead quiet. Is there a way of turning on the server-side messages as well?


Solution

  • You turn on server-side logging the same way as on the client side: LogConfig.logCommunication()

    For example see the lines 40ff in https://github.com/canoo/open-dolphin/blob/master/dolphin-grails/grails-app/utils/DolphinSpringBean.groovy

    Depending on your choice of server, the server may need some additional configuration to control where log statements go and whether they are generated at all.