GetLog returns the log destination we should use.
(logDir string)
| 34 | |
| 35 | // GetLog returns the log destination we should use. |
| 36 | func GetLog(logDir string) Log { |
| 37 | // is an external logging system enabled? |
| 38 | if _, err := os.Stat(logWriteSocket); !os.IsNotExist(err) { |
| 39 | return &remoteLog{ |
| 40 | fifoDir: "/var/run", |
| 41 | } |
| 42 | } |
| 43 | return &fileLog{ |
| 44 | dir: logDir, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | type fileLog struct { |
| 49 | dir string |