class LogStrategy extends AbstractTagStrategy {

    public void execute(final VoiceXmlInterpreterContext context,
            final VoiceXmlInterpreter interpreter,
            final FormInterpretationAlgorithm fia, final FormItem item,
            final VoiceXmlNode node) throws JVoiceXMLEvent {
        final NodeList list = node.getChildNodes();
        final StringBuilder outputText = new StringBuilder();

        // get and write the label attribute
        final String label = (String) getAttribute(Log.ATTRIBUTE_LABEL);
        if (label != null) {
            outputText.append(label);
            outputText.append(": ");
        }

        final String expr = (String) getAttribute(Log.ATTRIBUTE_EXPR);
        if (expr != null) {
            outputText.append(expr);
        }

        // process children
        final DataModel model = context.getDataModel();
        for (int i = 0; i < list.getLength(); i++) {
            final VoiceXmlNode current = (VoiceXmlNode) list.item(i);
            if (current instanceof Text) {
                // text node handling
                final Text text = (Text) current;
                final String msg = text.getNodeValue();
                if (msg == null) {
                    LOGGER.warn("ignoring empty log node");
                } else {
                    outputText.append(msg.trim());
                }
            }

            if (current instanceof Value) {
                // value node handling
                final Value value = (Value) current;
                String currentExpr = value.getExpr();
                if (currentExpr != null) {
                    final String unescapedCurrentExpr = StringEscapeUtils
                            .unescapeXml(currentExpr);
                    if (!currentExpr.endsWith(";")) {
                        currentExpr += ";";
                    }
                    final Object eval = model.evaluateExpression(
                            unescapedCurrentExpr, Object.class);
                    final String evalReadable = model.toString(eval);
                    outputText.append(evalReadable);
                }
            }
        }

        // write the eventual tag-value to the class-logger,
        // priority Level.INFO
        if (outputText.length() > 0) {
            LOGGER.info(outputText.toString());
        }
    }

      LogStrategy();

}