diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-01 12:24:15 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-01 12:24:15 -0200 |
commit | 016cbde4f2363fe3ddd25ee7e30bbfae295c4922 (patch) | |
tree | 8b0540301476b9b0937031529cf1be3db04bd42a /brweather/bin/logs | |
download | brweather-016cbde4f2363fe3ddd25ee7e30bbfae295c4922.tar.gz brweather-016cbde4f2363fe3ddd25ee7e30bbfae295c4922.tar.bz2 |
Initial mirroring in a git repo
Diffstat (limited to 'brweather/bin/logs')
-rwxr-xr-x | brweather/bin/logs | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/brweather/bin/logs b/brweather/bin/logs new file mode 100755 index 0000000..34fb4e9 --- /dev/null +++ b/brweather/bin/logs @@ -0,0 +1,92 @@ +#!/bin/bash +# Analisador de logs do BrWeather +# Criado por LeandroNKZ <leandronkz@gmail.com> +# Se encontrar BUGs, ou erros no programa, favor reportar ao desenvolvedor +# Acesse o site para maiores instruções: +# http://brweatherproject.blogspot.com/ +# Distribuído sob licença GPLv3 + +#Data e hora atual +DATA=`date "+%A %d/%m/%y %H:%M:%S"` + +#Cabeçalho +clear +echo "Criando relatório de logs..." + +sleep 2 + +echo "Arquivo de logs do BrWeather-$VERSION +Criado em: $DATA + +Em caso de erros persistentes no programa, por favor, leia e envie este arquivo de logs para o e-mail abaixo: + +leandronkz@gmail.com + +Lembre-se de que ele contém a sua cidade/estado. +Se não quiser expor estar informações, não envie." > ~/brweather.log + +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + + + + + +#Copiando logs de erros +echo "" +echo "Analisando logs de erros..." +sleep 2 + +echo "Log de erros" >> ~/brweather.log +cat ~/.brweather/log 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log + +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + + +#Copiando cache INPE +echo "" +echo "Copiando cache..." +sleep 1 + +echo "Previsão" >> ~/brweather.log +echo "" >> ~/brweather.log +cat ~/.brweather/cache/previsao 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + +echo "Cache" >> ~/brweather.log +echo "" >> ~/brweather.log +cat ~/.brweather/cache/cache 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + + +#Copiando cache Google +echo "PrevisãoG" >> ~/brweather.log +echo "" >> ~/brweather.log +cat ~/.brweather/cache/previsaog 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + +echo "GCache" >> ~/brweather.log +echo "" >> ~/brweather.log +cat ~/.brweather/cache/gcache 2>/dev/null >> ~/brweather.log || echo "Não encontrado" >> ~/brweather.log +echo "" >> ~/brweather.log +echo "-----------------------------------------------------------------------------------------------------------------" >> ~/brweather.log +echo "" >> ~/brweather.log + +sleep 2 + +#FIM +echo "" +echo "Criação do log completa! +Leia o arquivo em: +/home/seu_usuário/brweather.log" +echo "" +sleep 2 |