Fazendo os prints do Python aparecerem no systemctl status

  • fazer todos os prints passarem o parâmetro flush=True

[code language="python"] import functools print = functools.partial(print, flush=True) [/code]

  • chamar o python e direcionar as saídas, tipo 1>/dev/null 2>/dev/null
  • chamar o python com o parâmetro -u (não funcionou comigo)

Referência

https://stackoverflow.com/questions/230751/how-to-flush-output-of-print-function

https://fhackts.wordpress.com/2014/11/27/systemd-journal-not-showing-python-3-print/

You should also read:

Fazendo SELECT (query) em uma tabela do Google Spreadsheet

Documentação da função QUERY https://support.google.com/docs/answer/3093343?hl=pt-BR Documentação da linguagem SQL usada na função QUERY https://developers.google.com/chart/interactive/docs/querylanguage Documentação do FILTER https://support.google.com/docs/answer/3093197?hl=pt Documentação do ARRAYFORMULA https://support.google.com/docs/answer/3093275?hl=pt-BR

Fazendo log de queries no PostgreSQL

ALTER DATABASE your_database_nameSET log_statement = 'all';// https://stackoverflow.com/questions/722221/how-to-log-postgresql-queriesSELECT set_config('log_statement', 'all', true); postgresql.conf#log_directory = 'pg_log' to log_directory = 'pg_log'#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' to log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'#log_statement…