PageRenderTime 31ms CodeModel.GetById 24ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/log/log_configuration.e

http://github.com/tybor/Liberty
Specman e | 59 lines | 28 code | 5 blank | 26 comment | 0 complexity | a4cd164766e311c43aaba7930ee9bb0b MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4expanded class LOG_CONFIGURATION
 5--
 6-- To configure the logging framework.
 7--
 8
 9feature {ANY}
10   load (a_stream: INPUT_STREAM; when_error: PROCEDURE[TUPLE[STRING]]; path_resolver: FUNCTION[TUPLE[STRING], STRING]; a_load_completion: PROCEDURE[TUPLE])
11      require
12         a_stream.is_connected
13      do
14         internal.load(a_stream, when_error, path_resolver, a_load_completion)
15      end
16
17feature {LOGGING}
18   logger (a_tag: FIXED_STRING): LOGGER
19      require
20         a_tag /= Void
21      do
22         Result := internal.conf_logger(a_tag)
23      ensure
24         Result /= Void
25      end
26
27feature {LOGGER}
28   generation_id: INTEGER
29      do
30         Result := internal.generation_id
31      end
32
33feature {}
34   internal: LOG_INTERNAL_CONF
35      once
36         create Result.make
37      end
38
39end -- class LOG_CONFIGURATION
40--
41-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
42--
43-- Permission is hereby granted, free of charge, to any person obtaining a copy
44-- of this software and associated documentation files (the "Software"), to deal
45-- in the Software without restriction, including without limitation the rights
46-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
47-- copies of the Software, and to permit persons to whom the Software is
48-- furnished to do so, subject to the following conditions:
49--
50-- The above copyright notice and this permission notice shall be included in
51-- all copies or substantial portions of the Software.
52--
53-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59-- THE SOFTWARE.