Migrated to Simple_Logging
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user