You can use simple curl requests to translate your files. The following scripts work on OSX, but you could easily adapt them for other *nixes if necessary.
logback_xml_to_groovy.sh:
#!/bin/bash
##############################################
# Prints the groovy equivalent of the given logback.xml file.
# Redirect to a file.
#
# Usage:
# $ logback_xml_to_groovy.sh path/to/logback.xml > path/to/file.groovy
#
##############################################
[ -z $1 ] && echo 'syntax error' && exit 1
log4j_to_logback.sh
#!/bin/bash
##############################################
# Prints the XML equivalent of the given log4j.properties file.
# Redirect to a file.
#
# Usage:
# $ log4j_to_logback.sh path/to/log4j.properties > path/to/logback.xml
#
##############################################
[ -z $1 ] && echo 'syntax error' && exit 1