客户端 fixbug 开启上传日志功能

This commit is contained in:
2023-12-14 00:26:15 +08:00
parent c3582c2bac
commit 2aaff4b59e

View File

@@ -32,11 +32,11 @@ public class LogService {
ChannelSftp sftp = (ChannelSftp) session.openChannel("sftp");
File file = new File("/home/venue/logs/common-default.log");
if (file.exists()) {
sftp.connect();
sftp.put(new FileInputStream(file), "/home/uploadlog/" + System.getProperty(NettyConstant.VENUE_CLIENT_SN) + "-" + sdf.format(new Date()) + "-client.log");
logger.info("上传日志成功");
}
if (sftp != null) {
sftp.connect();
sftp.disconnect();
}
if (session != null) {