c4se記:さっちゃんですよ☆

.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)

.。oO(此のblogは、主に音樂考察Programming に分類されますよ。ヾ(〃l _ l)ノ゙♬♪♡)

音樂は SoundCloud に公開中です。

考察は現在は主に Scrapbox で公表中です。

Programming は GitHub で開發中です。

macOS に Homebrew で入れた PostgreSQL の query log を見る

忘備。

brew info postgresql (私の手元ではbrew info postgresql@9.6) で plist file を探す。色々と PATH が表示されるので勘で plist file を見附ける。例へば/usr/local/opt/postgresql@9.6/homebrew.mxcl.postgresql@9.6.plist

postgres 實行 file に渡す引數が書いてある。設定 file はそこに有る。例へば/usr/local/var/postgresql@9.6/

postgresql.confを開き、comment out されてゐる log_statement を、

log_statement = 'all'                   # none, ddl, mod, all

とする。

先の plist file に log file が書いてあるからそれを tail する。例へば、

tail -f /usr/local/var/log/postgresql@9.6.log

PostgreSQL を再起動する。

brew services restart postgresql@9.6

終り。Redis はredis-cli monitorで見られて樂ですね。