Add some usage information to the project
This commit is contained in:
parent
7820791af4
commit
6e210e443d
18
README.adoc
18
README.adoc
|
@ -3,3 +3,21 @@
|
|||
Logga is a simple, small, and fast logging library for Ada 2012. Unlike
|
||||
link:https://codelabs.ch/alog/index.html[Alog], which is very powerful and
|
||||
configurable, Logga aims for the most minimal runtime footprint possible.
|
||||
|
||||
== Using
|
||||
|
||||
Logga is very simple to use, but has a number of helpful functions which will help write faster logging code in Ada.
|
||||
|
||||
[source, ada]
|
||||
----
|
||||
with Logga;
|
||||
|
||||
procedure Main is
|
||||
Log : constant Logga.Log_Type := (Level => Logga.Info,
|
||||
Colors => True);
|
||||
begin
|
||||
Log.Info ("Hello World!");
|
||||
Log.Debug ("This is a {1} message, with a magic number: {2}",
|
||||
(Log.d ("tokenized"), Log.d (42)));
|
||||
end Main;
|
||||
----
|
||||
|
|
|
@ -43,7 +43,11 @@ package Logga is
|
|||
function d (L : in Log_Type;
|
||||
Token : in Integer) return Unbounded_String;
|
||||
|
||||
-- T is a small helper function to convert something to an suitable token
|
||||
-- T is a small helper function to convert something to an suitable token for
|
||||
-- output.
|
||||
--
|
||||
-- NOTE: This function is not optimized and will result in new string allocation
|
||||
-- regardless of the log level.
|
||||
function T (Token : in String) return Unbounded_String;
|
||||
function T (Token : in Integer) return Unbounded_String;
|
||||
|
||||
|
|
Loading…
Reference in New Issue