sh 使用google stackdriver日志记录Log Bash命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 使用google stackdriver日志记录Log Bash命令相关的知识,希望对你有一定的参考价值。

function prompt {
if [[ $? -eq 0 ]];then
    (gcloud beta logging write bash_log "`fc -nl -1`" --severity=INFO > /dev/null 2>&1 &)
else
    (gcloud beta logging write bash_log "`fc -nl -1`" --severity=ERROR > /dev/null 2>&1 &)
fi
}

PROMPT_COMMAND=prompt

以上是关于sh 使用google stackdriver日志记录Log Bash命令的主要内容,如果未能解决你的问题,请参考以下文章