2013-08-04 27 views
0

我有一個在虛擬環境(MAC OS)中運行的Django項目,我可以在哪裏訪問postgres日誌? 問這個問題之前,我特地到以下職位,但我找不到的地方記錄他們建議 * http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html * How to check status of PostgreSQL server Mac OS X * http://www.postgresqlformac.com/server/error_startup_fails_after_i.html * Where are the PostgreSQL logs on Mac OS X?Django虛擬環境,Postgres的日誌在mac中保存在哪裏?

+1

你應該先搜索之前提交問題的http://計算器。 com/questions/2563494/where-postgresql-logs-are-mac-os-x – anhtran

+0

我查看了那些帖子,但是我找不到它! – name

+0

我想你可能會嘗試通過自制軟件http://brew.sh/安裝它。這很容易。 – anhtran

回答

2
  1. 您可以find它使用下面的命令:

    sudo find/-name pg_log 
    

    輸出:

    /Library/PostgreSQL/9.2/data/pg_log 
    
  2. 如果上述嘗試失敗,試圖找到在你的plist日誌位置

    我的plist位於/Library/LaunchDaemons/,另一個可能的位置是/Library/LaunchAgents/

    檢查com.edb.launchd.postgresql-9.2.plist包含以下內容:

    <dict> 
        ...... 
        <key>StandardErrorPath</key> 
        <string>/usr/local/var/postgres/server.log</string> 
    </dict> 
    

    在上述情況下,日誌位於/usr/local/var/postgres/server.log

+0

這條命令沒有顯示出來。 pg_log是psql的日誌文件嗎?我在哪裏可以設置psql的日誌文件路徑詳細信息? – name

+0

它的工作,我有我的日誌在/usr/local/var/postgres/server.log – name