Migrated to Simple_Logging
This commit is contained in:
@@ -18,7 +18,7 @@ project Alire is
|
|||||||
|
|
||||||
package Compiler is
|
package Compiler is
|
||||||
for Switches ("ada") use ("-gnatwa", "-gnatVa", "-g", "-O2", "-gnat12",
|
for Switches ("ada") use ("-gnatwa", "-gnatVa", "-g", "-O2", "-gnat12",
|
||||||
"-gnato", "-fstack-check", "-gnata");
|
"-gnato", "-fstack-check", "-gnata", "-fPIC");
|
||||||
end Compiler;
|
end Compiler;
|
||||||
|
|
||||||
package Binder is
|
package Binder is
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ package body Alire.Query is
|
|||||||
use Containers.Project_Release_Maps;
|
use Containers.Project_Release_Maps;
|
||||||
begin
|
begin
|
||||||
for Rel of I loop
|
for Rel of I loop
|
||||||
Log (" " & Rel.Milestone_Image, Verbose);
|
Log (" " & Rel.Milestone_Image, Detail);
|
||||||
end loop;
|
end loop;
|
||||||
end Print_Solution;
|
end Print_Solution;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
|
||||||
+6
-4
@@ -2,6 +2,8 @@ private with Ada.Containers.Indefinite_Holders;
|
|||||||
|
|
||||||
with Semantic_Versioning;
|
with Semantic_Versioning;
|
||||||
|
|
||||||
|
with Simple_Logging;
|
||||||
|
|
||||||
package Alire with Preelaborate is
|
package Alire with Preelaborate is
|
||||||
|
|
||||||
File_Error : exception;
|
File_Error : exception;
|
||||||
@@ -33,13 +35,13 @@ package Alire with Preelaborate is
|
|||||||
|
|
||||||
function Version (M : Milestone) return Semantic_Versioning.Version;
|
function Version (M : Milestone) return Semantic_Versioning.Version;
|
||||||
|
|
||||||
|
---------------
|
||||||
-- LOGGING --
|
-- LOGGING --
|
||||||
|
---------------
|
||||||
|
|
||||||
type Verbosities is (Debug, Verbose, Terse);
|
use all type Simple_Logging.Levels;
|
||||||
|
|
||||||
Verbosity : Verbosities := Terse;
|
procedure Log (S : String; Level : Simple_Logging.Levels := Info) renames Simple_Logging.Log;
|
||||||
|
|
||||||
procedure Log (S : String; Level : Verbosities := Terse);
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user