Detached simple logging as submodule

This commit is contained in:
Jano at Zelda
2018-02-08 16:08:05 +01:00
parent c5247489a2
commit da31d4c8ce
8 changed files with 16 additions and 89 deletions
+3
View File
@@ -2,3 +2,6 @@
path = deps/semver
url = https://bitbucket.org/aleteolabs/semver.git
branch = master
[submodule "deps/simple_logging"]
path = deps/simple_logging
url = git@github.com:mosteo/simple_logging.git
Vendored Submodule
+1
Submodule deps/simple_logging added at 77896e4a9d
-11
View File
@@ -1,11 +0,0 @@
# Object files
lib
obj
# Ada Library Information
*.ali
# Miscellaneous cruft
*.cgpr
*.db
*.xml
-22
View File
@@ -1,22 +0,0 @@
project Simple_Logging is
for Library_Name use "simple_logging";
for Library_Version use "0.0.0";
for Source_Dirs use (".", "src");
for Object_Dir use "obj";
for Library_Dir use "lib";
package Builder is
for Switches ("ada") use ("-j0", "-g");
end Builder;
package Compiler is
for Switches ("ada") use ("-gnatVa", "-gnatwa", "-g", "-O2", "-gnata", "-gnat12", "-gnato", "-fstack-check");
end Compiler;
package Binder is
for Switches ("ada") use ("-Es");
end Binder;
end Simple_Logging;
-14
View File
@@ -1,14 +0,0 @@
aggregate project Simple_Logging_Alr is
-- This is an automatically generated file. DO NOT EDIT MANUALLY!
for Project_Files use ("simple_logging.gpr");
for Project_Path use (
"/home/jano/.cache/alire/projects/alire_0.4.0_da62fcae",
"/home/jano/.cache/alire/projects/alr_0.4.0_146fe156",
"/home/jano/.cache/alire/projects/semantic_versioning_1.0.0_4f9dd639");
for external ("ALIRE") use "True";
end Simple_Logging_Alr;
-25
View File
@@ -1,25 +0,0 @@
with GNAT.IO;
package body Simple_Logging is
function Prefix (Level : Levels) return String is
(case Level is
when Always => "",
when Error => "ERROR: ",
when WARNING => "Warning: ",
when Info => "",
when Detail => "-> ",
when Debug => "-->> ");
---------
-- Log --
---------
procedure Log (S : String; Level : Levels := Info) is
begin
if Level <= Simple_Logging.Level then
GNAT.IO.Put_Line (Prefix (Level) & S);
end if;
end Log;
end Simple_Logging;
-17
View File
@@ -1,17 +0,0 @@
package Simple_Logging with Preelaborate is
type Levels is (Always,
Error,
Warning,
Info,
Detail,
Debug);
-- From most important to less important
Level : Levels := Info;
-- Any message at the same level or below will be output to console
procedure Log (S : String; Level : Levels := Info);
-- Report a log message
end Simple_Logging;
+12
View File
@@ -0,0 +1,12 @@
package Alire.Index.Simple_Logging is
Name : constant Project_Name := "simple_logging";
Repo : constant URL := "https://github.com/mosteo/simple_logging.git";
V_1_0_0 : constant Release :=
Register_Git (Name,
V ("1.0.0"),
Repo,
"77896e4a9d0539a63e6bfb657ab955656c2e3c0f");
end Alire.Index.Simple_Logging;