1-----------------------------------------------------------------------
2--  Logs -- Utility Log Package
3--  Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2011 Stephane Carrez
4--  Written by Stephane Carrez (Stephane.Carrez@gmail.com)
5--
6--  Licensed under the Apache License, Version 2.0 (the "License");
7--  you may not use this file except in compliance with the License.
8--  You may obtain a copy of the License at
9--
10--      http://www.apache.org/licenses/LICENSE-2.0
11--
12--  Unless required by applicable law or agreed to in writing, software
13--  distributed under the License is distributed on an "AS IS" BASIS,
14--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15--  See the License for the specific language governing permissions and
16--  limitations under the License.
17-----------------------------------------------------------------------
18
19--  The <b>Util.Log</b> package provides a simple logging framework inspired
20--  from the Java Log4j library.
21package Util.Log is
22
23   pragma Preelaborate;
24
25   subtype Level_Type is Natural;
26
27   FATAL_LEVEL : constant Level_Type := 0;
28   ERROR_LEVEL : constant Level_Type := 5;
29   WARN_LEVEL  : constant Level_Type := 7;
30   INFO_LEVEL  : constant Level_Type := 10;
31   DEBUG_LEVEL : constant Level_Type := 20;
32
33   --  Get the log level name.
34   function Get_Level_Name (Level : Level_Type) return String;
35
36   --  Get the log level from the property value
37   function Get_Level (Value   : in String;
38                       Default : in Level_Type := INFO_LEVEL) return Level_Type;
39
40end Util.Log;
41