Well, there are lots of ways of approaching this. You could share the logs directories and have your script address search each and unify the results.
You could look at the JSP source of Log File viewer and do something like it yourself.
Or you could do something substantially different, e.g. use the Dumper MBean's executeScript() operations along with MethodServers MBean broadcast as in the Log File viewer to execute a log file search and collation script on each node. [The script can be in JavaScript or, if you install add another javax.scripting-compatible script engine library, numerous other scripting languages.]
And as far as command-line access, you could do all of this from the command-line, of course, in Java or in a javax.scripting language (try "windchill wt.util.jmx.RunScript" and "windchill wt.util.jmx.RunSMScript"...). This is just done in a JSP to provide easy browser access.