Revision 9411474b src/Ganeti/Runtime.hs

b/src/Ganeti/Runtime.hs
4 4

  
5 5
{-
6 6

  
7
Copyright (C) 2011, 2012 Google Inc.
7
Copyright (C) 2011, 2012, 2013 Google Inc.
8 8

  
9 9
This program is free software; you can redistribute it and/or modify
10 10
it under the terms of the GNU General Public License as published by
......
75 75
daemonName GanetiRapi    = C.rapi
76 76
daemonName GanetiConfd   = C.confd
77 77

  
78
-- | Returns the log file base for a daemon.
79
daemonLogBase :: GanetiDaemon -> String
80
daemonLogBase GanetiMasterd = C.daemonsLogbaseGanetiMasterd
81
daemonLogBase GanetiNoded   = C.daemonsLogbaseGanetiNoded
82
daemonLogBase GanetiRapi    = C.daemonsLogbaseGanetiRapi
83
daemonLogBase GanetiConfd   = C.daemonsLogbaseGanetiConfd
84

  
78 85
-- | Returns the configured user name for a daemon.
79 86
daemonUser :: GanetiDaemon -> String
80 87
daemonUser GanetiMasterd = C.masterdUser
......
95 102
daemonLogFile :: GanetiDaemon -> IO FilePath
96 103
daemonLogFile daemon = do
97 104
  logDir <- Path.logDir
98
  return $ logDir </> daemonName daemon <.> "log"
105
  return $ logDir </> daemonLogBase daemon <.> "log"
99 106

  
100 107
-- | Returns the pid file name for a daemon.
101 108
daemonPidFile :: GanetiDaemon -> IO FilePath

Also available in: Unified diff