diff --git a/alire.gpr b/alire.gpr index 476e43c8..15bb12d4 100644 --- a/alire.gpr +++ b/alire.gpr @@ -18,7 +18,7 @@ project Alire is package Compiler is for Switches ("ada") use ("-gnatwa", "-gnatVa", "-g", "-O2", "-gnat12", - "-gnato", "-fstack-check", "-gnata"); + "-gnato", "-fstack-check", "-gnata", "-fPIC"); end Compiler; package Binder is diff --git a/src/alire-query.adb b/src/alire-query.adb index 2af29e6a..208683c5 100644 --- a/src/alire-query.adb +++ b/src/alire-query.adb @@ -25,7 +25,7 @@ package body Alire.Query is use Containers.Project_Release_Maps; begin for Rel of I loop - Log (" " & Rel.Milestone_Image, Verbose); + Log (" " & Rel.Milestone_Image, Detail); end loop; end Print_Solution; diff --git a/src/alire.adb b/src/alire.adb deleted file mode 100644 index c164b15a..00000000 --- a/src/alire.adb +++ /dev/null @@ -1,16 +0,0 @@ -with GNAT.IO; - -package body Alire is - - procedure Log (S : String; Level : Verbosities := Terse) is - begin - if Level >= Verbosity then - GNAT.IO.Put_Line - ((case Level is - when Terse => "", - when Verbose => "-> ", - when Debug => "-->> ") & S); - end if; - end Log; - -end Alire; diff --git a/src/alire.ads b/src/alire.ads index 57ed17d5..922d58b4 100644 --- a/src/alire.ads +++ b/src/alire.ads @@ -2,6 +2,8 @@ private with Ada.Containers.Indefinite_Holders; with Semantic_Versioning; +with Simple_Logging; + package Alire with Preelaborate is File_Error : exception; @@ -33,13 +35,13 @@ package Alire with Preelaborate is function Version (M : Milestone) return Semantic_Versioning.Version; + --------------- -- LOGGING -- + --------------- - type Verbosities is (Debug, Verbose, Terse); + use all type Simple_Logging.Levels; - Verbosity : Verbosities := Terse; - - procedure Log (S : String; Level : Verbosities := Terse); + procedure Log (S : String; Level : Simple_Logging.Levels := Info) renames Simple_Logging.Log; private