X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FConfiguration.hs;h=4d76c739d25be973c33f49feab618284fa05f949;hb=5124833f973f6c47a4eda3f4e343d3d8631897c6;hp=d56cc936e6fc6983ae94ea78cc57885de27cbe54;hpb=9d278c8b8eeff1a1317f2c3b0f7fdf5fb759ffb3;p=dead%2Fhtsn-import.git diff --git a/src/Configuration.hs b/src/Configuration.hs index d56cc93..4d76c73 100644 --- a/src/Configuration.hs +++ b/src/Configuration.hs @@ -11,6 +11,7 @@ import System.Console.CmdArgs.Default ( Default(..) ) import System.Log ( Priority( INFO ) ) import Backend ( Backend(..) ) +import ConnectionString ( ConnectionString ) import qualified OptionalConfiguration as OC ( OptionalConfiguration(..), merge_maybes ) @@ -20,9 +21,10 @@ import qualified OptionalConfiguration as OC ( data Configuration = Configuration { backend :: Backend, - connection_string :: String, + connection_string :: ConnectionString, log_file :: Maybe FilePath, log_level :: Priority, + remove :: Bool, syslog :: Bool } deriving (Show) @@ -34,6 +36,7 @@ instance Default Configuration where connection_string = def, log_file = def, log_level = INFO, + remove = def, syslog = def } @@ -49,6 +52,7 @@ merge_optional cfg opt_cfg = (merge (connection_string cfg) (OC.connection_string opt_cfg)) (OC.merge_maybes (log_file cfg) (OC.log_file opt_cfg)) (merge (log_level cfg) (OC.log_level opt_cfg)) + (merge (remove cfg) (OC.remove opt_cfg)) (merge (syslog cfg) (OC.syslog opt_cfg)) where -- | If the thing on the right is Just something, return that