提交 53e8321d authored 作者: 陈泽健's avatar 陈泽健

注释调试代码

上级 7822010f
...@@ -1970,15 +1970,15 @@ def get_remote_log_with_paramiko(host, username, private_key_path, passphrase, l ...@@ -1970,15 +1970,15 @@ def get_remote_log_with_paramiko(host, username, private_key_path, passphrase, l
finally: finally:
client.close() client.close()
if __name__ == "__main__": # if __name__ == "__main__":
host = "192.168.5.218" # host = "192.168.5.218"
username = "root" # username = "root"
private_key_path = "C:\\Users\\29194\\.ssh\\id_rsa" # 替换为你的私钥文件路径 # private_key_path = "C:\\Users\\29194\\.ssh\\id_rsa" # 替换为你的私钥文件路径
passphrase = "Ubains@123" # 替换为你的 passphrase # passphrase = "Ubains@123" # 替换为你的 passphrase
log_path = "/var/www/java/api-java-meeting2.0/logs/ubains-INFO-AND-ERROR.log" # log_path = "/var/www/java/api-java-meeting2.0/logs/ubains-INFO-AND-ERROR.log"
log_content = get_remote_log_with_paramiko(host, username, private_key_path, passphrase, log_path) # log_content = get_remote_log_with_paramiko(host, username, private_key_path, passphrase, log_path)
#
if log_content: # if log_content:
print(log_content) # print(log_content)
else: # else:
print("Failed to retrieve log content.") # print("Failed to retrieve log content.")
\ No newline at end of file \ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论