Output method of logs in Java

xiaoxiao2021-03-06  36

In a script, according to the ANT configuration, you can redirect the output of the Java program to the standard output, and the probably the script is as follows:

#! / bin / sh

X = `ls / home / qianglee / mail / lib / *. jar`

x = `Echo $ x | Sed -E 'S / /: / G'`

Echo $ x

Java-cp $ x: $ classpath com.lj.maillisten 1 >> ./ MailerRor.log 2 >> ./mailout.log >> ./mailtmp.log

#java -cp $ x: $ classpath com.lj.maillisten >> ./ Mailistener.log

#java -cp $ x: $ classpath com.lj.prasemimeMessage >> ./ Mailistener.log

1 is the standard error, 2 is the standard output

转载请注明原文地址:https://www.9cbs.com/read-64348.html

New Post(0)