pax_global_header00006660000000000000000000000064117214457710014523gustar00rootroot0000000000000052 comment=5cc768409880083dd5d472c97d7806acd9b6172f libalog-0.4.1/000077500000000000000000000000001172144577100131365ustar00rootroot00000000000000libalog-0.4.1/.gitignore000066400000000000000000000000651172144577100151270ustar00rootroot00000000000000cov lib obj perf src/alog-version.ads alog.specs *.o libalog-0.4.1/AUTHORS000066400000000000000000000001101172144577100141760ustar00rootroot00000000000000Reto Buerki Adrian-Ken Rueegsegger libalog-0.4.1/CHANGELOG000066400000000000000000000022341172144577100143510ustar00rootroot00000000000000Alog Changelog ============== Version 0.4.1 ------------- .Additions and changes - Minor corrections to README. - Drop major version symlink. - Add revision number to library version. Version 0.4 ----------- .Additions and changes - Use latest libaws jabber API. - Remove policy handling from loggers. - Change default loglevel to Info. - Rewrite tasked logger exception handling. - Cleanup of syslog facility. - Auto-generate documentation. Version 0.3 ----------- .Additions and changes - Architecture cleanup. - Tasked and Active loggers. - Loglevel policies (source and destination filtering). - Coverage report generation. - Profiling support. - Provide code examples. .Bug fixes - Make stdout redirection work with FD facility. Version 0.2 ----------- .Additions and changes - PostgreSQL-based facility implemented. - Introduce two build types: base and full. - Transformations infrastructure implemented. .Bug fixes - Compile-fixes for GNAT 4.3. Version 0.1 ----------- .Additions and changes - File_Descriptor facility implemented. - Syslog facility implemented. - SMTP facility implemented. - XMPP facility implemented. - Basic logger support. .Bug fixes - none. libalog-0.4.1/LICENSE000066400000000000000000000634711172144577100141560ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libalog-0.4.1/Makefile000066400000000000000000000103701172144577100145770ustar00rootroot00000000000000# # Copyright (c) 2008-2011, # Reto Buerki, Adrian-Ken Rueegsegger # # This file is part of Alog. # # Alog is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Alog is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with Alog; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301 USA # PREFIX ?= $(HOME)/libraries INSTALL = install TARGET ?= "base" MAJOR = 0 MINOR = 4 REVISION = 1 VERSION = $(MAJOR).$(MINOR).$(REVISION) ALOG = libalog-$(VERSION) SO_LIBRARY = libalog.so.$(VERSION) A_LIBRARY = libalog.a LIBRARY_KIND = dynamic SOURCEDIR = src OBJECTDIR = obj/$(TARGET) LIBDIR = lib/$(TARGET) COVDIR = cov/$(TARGET) PROFDIR = prof/$(TARGET) ALI_FILES = lib/$(TARGET)/*.ali GPR_FILE = gnat/alog.gpr TMPDIR = /tmp DISTDIR = $(TMPDIR)/$(ALOG) TARBALL = $(ALOG).tar.bz2 PWD = `pwd` NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN) GMAKE_OPTS = -p -R -j$(NUM_CPUS) CFLAGS = -fPIC -W -Wall -Werror -O3 LIBGLUE_SOURCES = $(wildcard libglue/*.c) LIBGLUE_OBJECTS = $(LIBGLUE_SOURCES:.c=.o) all: build_lib tests: build_tests @$(OBJECTDIR)/runner_$(TARGET) build_lib: prepare @gnatmake $(GMAKE_OPTS) -Palog_$(TARGET) -XALOG_VERSION="$(VERSION)" -XLIBRARY_KIND="$(LIBRARY_KIND)" build_tests: prepare obj/lib/libglue.a @gnatmake $(GMAKE_OPTS) -Palog_$(TARGET)_tests -XALOG_BUILD="tests" build_all: build_lib build_tests prepare: $(SOURCEDIR)/alog-version.ads $(LIBGLUE_OBJECTS) @mkdir -p $(OBJECTDIR)/lib @cp $(LIBGLUE_OBJECTS) $(OBJECTDIR)/lib @mkdir -p $(COVDIR) $(PROFDIR) $(SOURCEDIR)/alog-version.ads: @echo "package Alog.Version is" > $@ @echo " Version_Number : constant String :=" >> $@ @echo " \"$(VERSION)\";" >> $@ @echo "end Alog.Version;" >> $@ clean: @rm -f alog.specs @rm -f $(LIBGLUE_OBJECTS) @rm -rf $(OBJECTDIR)/lib/* @rm -rf $(OBJECTDIR)/* @rm -rf $(LIBDIR)/* @rm -rf $(COVDIR)/* @rm -rf $(PROFDIR)/* $(MAKE) -C doc clean distclean: clean @rm -rf obj @rm -rf lib @rm -rf cov @rm -rf prof @rm -f $(SOURCEDIR)/alog-version.ads dist: distclean $(SOURCEDIR)/alog-version.ads @echo -n "Creating release tarball '$(ALOG)' ... " @mkdir -p $(DISTDIR) @cp -R * $(DISTDIR) @tar -C $(TMPDIR) -cjf $(TARBALL) $(ALOG) @rm -rf $(DISTDIR) @echo "DONE" install: install_lib install_$(LIBRARY_KIND) install_lib: build_lib @mkdir -p $(PREFIX)/include/alog @mkdir -p $(PREFIX)/lib/alog @mkdir -p $(PREFIX)/lib/gnat $(INSTALL) -m 644 $(SOURCEDIR)/* $(PREFIX)/include/alog $(INSTALL) -m 444 $(ALI_FILES) $(PREFIX)/lib/alog $(INSTALL) -m 644 $(GPR_FILE) $(PREFIX)/lib/gnat install_static: $(INSTALL) -m 444 $(LIBDIR)/$(A_LIBRARY) $(PREFIX)/lib/alog install_dynamic: $(INSTALL) -m 444 $(LIBDIR)/$(SO_LIBRARY) $(PREFIX)/lib/alog @cd $(PREFIX)/lib/alog && ln -sf $(SO_LIBRARY) libalog.so install_tests: $(INSTALL) -v -d $(PREFIX)/tests $(INSTALL) -m 755 $(OBJECTDIR)/runner_$(TARGET) $(PREFIX)/tests/test_runner @cp -vr data $(PREFIX)/tests cov: prepare @rm -f $(OBJECTDIR)/cov/*.gcda @gnatmake $(GMAKE_OPTS) -Palog_$(TARGET)_tests -XALOG_BUILD="coverage" @$(OBJECTDIR)/cov/runner_$(TARGET) || true @lcov -c -d $(OBJECTDIR)/cov/ -o $(OBJECTDIR)/cov/alog_tmp.info @lcov -e $(OBJECTDIR)/cov/alog_tmp.info "$(PWD)/src/*.adb" -o $(OBJECTDIR)/cov/alog.info @genhtml --no-branch-coverage $(OBJECTDIR)/cov/alog.info -o $(COVDIR) prof: prepare @rm -f $(OBJECTDIR)/callgrind.* @gnatmake $(GMAKE_OPTS) -Palog_$(TARGET)_tests -XALOG_BUILD="profiling" @cd $(OBJECTDIR) && \ valgrind -q --tool=callgrind ./profiler_$(TARGET) @cp $(OBJECTDIR)/callgrind.* $(PROFDIR) @callgrind_annotate $(PROFDIR)/callgrind.* > $(PROFDIR)/profiler_$(TARGET).txt obj/lib/libglue.a: $(LIBGLUE_OBJECTS) @mkdir -p obj/lib $(AR) $(ARFLAGS) $@ $^ doc: $(MAKE) -C doc .PHONY: cov dist doc prof tests build_all install_tests libalog-0.4.1/README000066400000000000000000000057041172144577100140240ustar00rootroot00000000000000Alog README =========== Alog is a stackable logging framework for Ada. It aims to be straight forward to use and is easily extendable. It provides support for various logger types, log facilities, loglevel policies and message transformations. Prerequisites ------------- Alog is written in Ada so you need to have GNAT installed to compile Alog. The library comes in two flavours: base and full. The base build includes facilities to log to files and syslog while the full version provides more advanced log facilities like SMTP, Jabber/XMPP or PostgreSQL. For the full version you need to have AWS (Ada Web Server) and APQ (Ada95 database binding) installed (see the 'Installation' section). GNAT is available for most distributions. Since Alog uses pedantic compiler flags to check the code, make sure you have gnat version 4.3 or later installed on your system. Download -------- Release version ~~~~~~~~~~~~~~~ The current release version of alog is available at http://www.codelabs.ch/download. The API documentation of the current release can be found at http://www.codelabs.ch/alog/api. Verify a Release ~~~~~~~~~~~~~~~~ To verify the integrity and authenticity of the distribution tarball, import the key http://www.codelabs.ch/keys/0x3DC359DEpub.asc and type the following command: $ gpg --verify libalog-{version}.tar.bz2.sig The key fingerprint of the public key ('0x3DC359DE') is: Key fingerprint = 752C 4EBC 115D 5EAD 75F7 0F34 A0AE 8AD7 3DC3 59DE Development version ~~~~~~~~~~~~~~~~~~~ The current development version of alog is available through its git repository: $ git clone http://git.codelabs.ch/git/alog.git A browsable version of the repository is also available here: http://git.codelabs.ch/?p=alog.git Installation ------------ The base build of Alog has no special library dependencies. To run the testcases (for both builds), you need to have the Ahven Unit Test-Framework installed: * Ahven (Test-Framework): http://ahven.stronglytyped.org/ To compile the full build, you further need to have the following libraries installed on your system: * AWS (Ada Web Server): http://libre.adacore.com/libre/tools/aws/ * APQ (Ada95 database binding): http://framework.kow.com.br/projects/show/apq The building and installation process of Alog is simple. Just type in the following commands. You must be root to install the library system wide. $ tar -xzf libalog-{version}.tar.bz2 $ cd libalog-{version} $ make $ make PREFIX=/usr/local install This will compile and install the base build (default). To do a full build, you need to set and export the environment variable `TARGET` to "full" like so: $ export TARGET=full $ make $ make PREFIX=/usr/local install If no `PREFIX` is specified, `$(HOME)/libraries` is used as installation directory. Tests ----- After compiling and linking Alog, you can test if everything works as expected by typing the following command: $ make tests You should then see `PASS` behind each of the tests. libalog-0.4.1/alog_base.gpr000066400000000000000000000027741172144577100155760ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with "alog_common"; project Alog_Base is for Languages use Alog_Common.Languages; for Source_Dirs use ("src"); for Source_List_File use "config/base-list"; for Object_Dir use "obj/base/lib"; for Library_Name use "alog"; for Library_Dir use "lib/base"; for Library_Kind use external ("LIBRARY_KIND", "dynamic"); for Library_Version use "libalog.so." & Alog_Common.Version; package Compiler is for Default_Switches ("ada") use Alog_Common.Compiler_Switches; end Compiler; package Builder is for Default_Switches ("ada") use ("-g"); end Builder; package Binder is for Default_Switches ("ada") use ("-E"); end Binder; end Alog_Base; libalog-0.4.1/alog_base_tests.gpr000066400000000000000000000041351172144577100170110ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with "ahven"; with "alog_common"; project Alog_Base_Tests is type Build_Type is ("tests", "coverage", "profiling"); Build : Build_Type := external ("ALOG_BUILD", "tests"); for Languages use Alog_Common.Languages; for Source_Dirs use ("src", "tests"); Compiler_Switches := Alog_Common.Compiler_Switches; Linker_Switches := Alog_Common.Linker_Switches; case Build is when "tests" => for Main use ("runner_base.adb"); for Object_Dir use "obj/base"; when "coverage" => for Main use ("runner_base.adb"); for Object_Dir use "obj/base/cov"; Compiler_Switches := Compiler_Switches & ("-ftest-coverage", "-fprofile-arcs"); Linker_Switches := Linker_Switches & ("-fprofile-generate"); when "profiling" => for Main use ("profiler_base.adb"); for Object_Dir use "obj/base"; end case; package Compiler is for Default_Switches ("ada") use Compiler_Switches; end Compiler; package Linker is for Default_Switches ("ada") use Linker_Switches; end Linker; package Builder is for Default_Switches ("ada") use ("-g"); end Builder; package Binder is for Default_Switches ("ada") use ("-E"); end Binder; end Alog_Base_Tests; libalog-0.4.1/alog_common.gpr000066400000000000000000000025251172144577100161460ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- project Alog_Common is for Source_Dirs use (); Version := external ("ALOG_VERSION", "0.1"); Languages := ("Ada", "C"); Compiler_Switches := ("-gnatygAdISuxo", "-gnatVa", "-gnat05", "-gnatwal", "-gnatf", "-fstack-check", "-gnato"); Linker_Switches := ("-Wl,--as-needed", "-Lobj/lib", "-lglue"); end Alog_Common; libalog-0.4.1/alog_full.gpr000066400000000000000000000027571172144577100156270ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with "aws"; with "apq-postgresql"; with "alog_common"; project Alog_Full is for Languages use Alog_Common.Languages; for Source_Dirs use ("src"); for Object_Dir use "obj/full/lib"; for Library_Name use "alog"; for Library_Dir use "lib/full"; for Library_Kind use external ("LIBRARY_KIND", "dynamic"); for Library_Version use "libalog.so." & Alog_Common.Version; package Compiler is for Default_Switches ("ada") use Alog_Common.Compiler_Switches; end Compiler; package Builder is for Default_Switches ("ada") use ("-g"); end Builder; package Binder is for Default_Switches ("ada") use ("-E"); end Binder; end Alog_Full; libalog-0.4.1/alog_full_tests.gpr000066400000000000000000000040531172144577100170400ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with "aws"; with "apq-postgresql"; with "ahven"; with "alog_common"; project Alog_Full_Tests is type Build_Type is ("tests", "coverage"); Build : Build_Type := external ("ALOG_BUILD", "tests"); for Languages use Alog_Common.Languages; for Source_Dirs use ("src", "tests"); for Main use ("runner_full.adb"); Compiler_Switches := Alog_Common.Compiler_Switches; Linker_Switches := Alog_Common.Linker_Switches; case Build is when "tests" => for Object_Dir use "obj/full"; when "coverage" => for Source_Dirs use ("src", "tests"); for Object_Dir use "obj/full/cov"; for Main use ("runner_full.adb"); Compiler_Switches := Compiler_Switches & ("-ftest-coverage", "-fprofile-arcs"); Linker_Switches := Linker_Switches & ("-fprofile-generate"); end case; package Compiler is for Default_Switches ("ada") use Compiler_Switches; end Compiler; package Linker is for Default_Switches ("ada") use Linker_Switches; end Linker; package Builder is for Default_Switches ("ada") use ("-g"); end Builder; package Binder is for Default_Switches ("ada") use ("-E"); end Binder; end Alog_Full_Tests; libalog-0.4.1/config/000077500000000000000000000000001172144577100144035ustar00rootroot00000000000000libalog-0.4.1/config/base-list000066400000000000000000000012501172144577100162070ustar00rootroot00000000000000alog.ads alog-active_logger.adb alog-active_logger.ads alog-controlled_map.adb alog-controlled_map.ads alog-exceptions.ads alog-facilities.adb alog-facilities.ads alog-facilities-file_descriptor.adb alog-facilities-file_descriptor.ads alog-facilities-syslog.adb alog-facilities-syslog.ads alog-helpers.adb alog-helpers.ads alog-logger.adb alog-logger.ads alog-log_request.adb alog-log_request.ads alog-maps.adb alog-maps.ads alog-policy_db.adb alog-policy_db.ads alog-protected_containers.adb alog-protected_containers.ads alog-tasked_logger.adb alog-tasked_logger.ads alog-transforms.adb alog-transforms.ads alog-transforms-casing.adb alog-transforms-casing.ads alog-version.ads libalog-0.4.1/data/000077500000000000000000000000001172144577100140475ustar00rootroot00000000000000libalog-0.4.1/data/Dst_Loglevel_Fd.ref000066400000000000000000000000231172144577100175340ustar00rootroot00000000000000[WARN] Testmessage libalog-0.4.1/data/Log_Append_Fd.ref000066400000000000000000000000241172144577100171620ustar00rootroot00000000000000Facility1 Facility2 libalog-0.4.1/data/Log_FD_Facility_Lowercase.ref000066400000000000000000000000721172144577100214660ustar00rootroot00000000000000logger test message, fd facility with lowercase transform libalog-0.4.1/data/Log_Multiple_FD_Facilities.ref000066400000000000000000000001361172144577100216460ustar00rootroot00000000000000[DEBU] Logger testmessage, multiple facilities [INFO] Logger testmessage, multiple facilities libalog-0.4.1/data/Log_One_FD_Facility.ref000066400000000000000000000000441172144577100202620ustar00rootroot00000000000000Logger testmessage, one fd facility libalog-0.4.1/data/Log_Overwrite_Fd.ref000066400000000000000000000000121172144577100177360ustar00rootroot00000000000000Facility2 libalog-0.4.1/data/Log_Source_Loglevel.ref000066400000000000000000000001511172144577100204340ustar00rootroot00000000000000[INFO] Test: Source test (logged) [DEBU] Default source (logged) [NOTI] Unknown: Unknown source (logged) libalog-0.4.1/data/Logger_Loglevel.ref000066400000000000000000000000751172144577100176170ustar00rootroot00000000000000[DEBU] Debug message (logged) [NOTI] Notice message (logged) libalog-0.4.1/data/Loglevel_Config.ref000066400000000000000000000003621172144577100176040ustar00rootroot00000000000000# This is a comment (ignored) # Displaced comment (ignored) # Next line is whitespaces only (ignored) # Default loglevel Default = Info # Source-specific loglevels Foo.* = Debug Foo.Bar = Alert Foo.Foo = Notice libalog-0.4.1/data/Loglevel_Config_Invalid1.ref000066400000000000000000000000521172144577100213270ustar00rootroot00000000000000# Invalid loglevel Default = Unsupported libalog-0.4.1/data/Loglevel_Config_Invalid2.ref000066400000000000000000000000441172144577100213310ustar00rootroot00000000000000# Completely invalid config file = libalog-0.4.1/data/Loglevel_Config_Nodef.ref000066400000000000000000000000521172144577100207130ustar00rootroot00000000000000# Source-specific loglevels Foo.* = Debug libalog-0.4.1/data/Set_Threshold_Fd.ref000066400000000000000000000001211172144577100177170ustar00rootroot00000000000000[DEBU] this message should appear in log [INFO] this message should appear again libalog-0.4.1/data/Tasked_FD_Facility.ref000066400000000000000000000010341172144577100201530ustar00rootroot00000000000000logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message logger tasked test message libalog-0.4.1/data/Toggle_Write_Loglevel_Fd.ref000066400000000000000000000000431172144577100213770ustar00rootroot00000000000000This is a message without loglevel libalog-0.4.1/data/Toggle_Write_Source_Fd.ref000066400000000000000000000001401172144577100210640ustar00rootroot00000000000000[WARN] No source given [INFO] Test: Source 'Test' [INFO] Source 'Test', source writing disabled libalog-0.4.1/data/Toggle_Write_Timestamp_Fd.ref000066400000000000000000000000441172144577100215720ustar00rootroot00000000000000This is a message without timestamp libalog-0.4.1/data/Trim_Loglevels_Fd.ref000066400000000000000000000002301172144577100201000ustar00rootroot00000000000000[DEBU] Testmessage [INFO] Testmessage [NOTI] Testmessage [WARN] Testmessage [ERRO] Testmessage [CRIT] Testmessage [ALER] Testmessage [EMER] Testmessage libalog-0.4.1/data/Write_Message_Fd.ref000066400000000000000000000000331172144577100177100ustar00rootroot00000000000000This is a test log-message libalog-0.4.1/data/Write_Transformed_Message_Fd.ref000066400000000000000000000000331172144577100222540ustar00rootroot00000000000000this is a test log-message libalog-0.4.1/data/ref_file1000066400000000000000000000001231172144577100156220ustar00rootroot00000000000000This is a test file with multiple lines of text used for Assert_Files_Equal tests libalog-0.4.1/data/ref_file2000066400000000000000000000001231172144577100156230ustar00rootroot00000000000000This is a test file with multiple lines of text used for Assert_Files_Equal tests libalog-0.4.1/data/ref_file3000066400000000000000000000001231172144577100156240ustar00rootroot00000000000000This is test file3 with multiple lines of text used for Assert_Files_Equal tests libalog-0.4.1/data/ref_file4000066400000000000000000000000231172144577100156240ustar00rootroot00000000000000This is test file4 libalog-0.4.1/doc/000077500000000000000000000000001172144577100137035ustar00rootroot00000000000000libalog-0.4.1/doc/.gitignore000066400000000000000000000000731172144577100156730ustar00rootroot00000000000000html/*.html html/*.css html/alog-arch.png CHANGELOG README libalog-0.4.1/doc/Makefile000066400000000000000000000013521172144577100153440ustar00rootroot00000000000000DESTDIR ?= html STYLEPATH ?= . ASCIIDOC_OPTS = \ --backend=xhtml11 \ --conf-file=page.conf \ -a stylesdir=$(STYLEPATH) \ -a linkcss \ -a disable-javascript \ -o - DST_HTML = \ $(DESTDIR)/index.html \ $(DESTDIR)/README.html \ $(DESTDIR)/CHANGELOG.html all: $(DESTDIR)/asciidoc.css $(DESTDIR)/alog-arch.png $(DST_HTML) $(DESTDIR)/alog-arch.png: arch/alog-arch.png cp $< $@ $(DESTDIR)/asciidoc.css: asciidoc.css cp $< $@ $(DESTDIR)/index.html: index page.conf asciidoc $(ASCIIDOC_OPTS) $< > $@ $(DESTDIR)/README.html: ../README asciidoc $(ASCIIDOC_OPTS) $< > $@ $(DESTDIR)/CHANGELOG.html: ../CHANGELOG asciidoc $(ASCIIDOC_OPTS) $< > $@ clean: rm -f $(DESTDIR)/*.html rm -f $(DESTDIR)/*.css rm -f $(DESTDIR)/alog-arch.png libalog-0.4.1/doc/arch/000077500000000000000000000000001172144577100146205ustar00rootroot00000000000000libalog-0.4.1/doc/arch/alog-arch.graphml000066400000000000000000000332431172144577100200360ustar00rootroot00000000000000 Alog Framework Ident_Levels Policy_DB Default_Loglevel Logger Facility File Syslog SMTP ... Process Accept_Src Accept_Dst Write Log_Message libalog-0.4.1/doc/arch/alog-arch.png000066400000000000000000000510441172144577100171670ustar00rootroot00000000000000‰PNG  IHDRV?„¶QëIDATxÚí xUÖ†›L€€l‚ ⨨,nƒ:€Š€(.#Š Ž ã(#Ž¢"*ÙFEÔ0ƒ‚,"{€ ! $„-@ !d²Y’Àù奄•T:ÕK’îNUç{Ÿç{º–^oŸ¾÷ësOUY,ÜEHHH>Ö±Žu¬cë¾¾›Eñ~{Êõ,~¼Így€?»Ðy¡EBAòyÒ&L˜p½4·óóªëâ¶O›ºÚ¶ŸÁö3‹íŠõžŽE4–P òš¸9{2Ÿ ˆfÿÑžñûoZ&ÌEi2ÚHSÐYîg#)ÔPè*a(>tÅXÙ«¯’FéÿÔÚ/ù^oј¢Ó:÷_Ã&ˆß«X?'nÃ5ë§4ðE~ï“&MjÊÏ/ö&ô¥|žé<=*?ÓÛlâÔuñ¸×Äò®´‡Þgж©x®çÅrœP½šƒDÑþÅ9k]Î];­K*"È-*¸’·vïå¼µ3 F¾4mÚˆÑäµ5ò“‚É€ªÂÙ1¨çؘ“4a6®±c¬Ö¨&Ból&~•û÷‹åN®f¤\ÉX±Asõ±òþAŽÖ5Ë™Ú÷Ê#βÉež] ?S¸0@Áê:g¶Ô¬”³ö°÷¤Ùz‹§`'OžÜ¸&Ç`qÎê¡”™/DŠ 3Kt4žèبÊJígmWѾWr"Oüž²x¸húºBBl´êhLVEþ”¡üxüŸ?‚ ˜ iÊ•'¶µcFŠõž‡§Á´·î4V:¦åGñ:gø½è+W×õ>·úù¤É:'–<£½eó¥É 9l{ŸO¶ñ'2[TSãïræŠ7){e‘ø7íü”(²/Ñ‚vD3ˆfX ªŠÛ‘ÛsUo¢m㈎D嬢#[g_AS¡FBAÒdÕAö *ÿGÀOè0OÛÙl’Ù?½,£ ×?Ùw+±¾Wè}uê¬*ÆŠ³k¶ŸÅæ¾Ñ<•É+5;%§6¸ÚŽŒ•¼}]ÖxÖ¸LUÆÒ¡”½¬ˆyʘküw&ÚòQæb¢Cë‰ò7AUUÞ:¢¬¥D;Æ-¿›h~¢ôÙŠ¹JŽšú‘ø*¸v°…gNëiÌ€ f«¸Æh†ŒË·ja¸áz£uj!·Xn'kªn‘Ïù7®SbS&§t³±:'‹ÉÙ>Æû'NœØ¢2ÆJ~þÍÚz(›öùDÖV½£]×Ì;kgÆJ>ïslÚj’¹¢èhÊ\˜O S5‡è‡†D{¦ 3µV˜ª…§”·†(ùKk{§Ï¢¢ŒŸOwjß’Vé(ÔZf°ê ù#kÏX±©èbÇX±yÙ¬g Ø<‰m»äQp»tŽ‚. IŽ,†?ï.c%ÍÐ)Y~¬2ÆJ55üÔiEíþñãÇß%k¡n—ë\,_ÌÅîlrÁ0öã"øšrd`qÚœA”1Ÿ(w5SŦêàbR¶Až·sòWÖvÏ¢¨ïG‡ˆ¯¤›P'i®8sèJÖ å/À‚ €ò¿‹4´(“±JŸýµ2ÅÓSKº嬴NOAÞ×´…÷ Ú6–løO”øJî—æŠ3Wœ’Y+Õl¢Vr¦G“Í*¶}Š–eŒUÚÌ$ÊøÉZ¨ž8š(u&ämmQ ÚÏí™}H|% ýYˆ§ÅyZ› ÚùhAL@u"ŒÔ >I&Ÿ SNNÁ‰/A9c•V@YË­ÓQ<=•y[(í_œ¹ŒO\ÛGè/B]…þ$ÔÄâât ªÛXíN”a=ÀÁe¤¬CÞ·;·n$×û="ÔSˆ ÙÛ[¬Eìu+”¿ƒ Œ«³±âó,ñ-¯Lü6µÒn×[64í/>G_¡^Bw uj抱€ŒÕîÏ­Ô<°ó-¯LŠirÃ} +MûÃXf6VI“‰²Â­;ßòºÁ¤˜&'ÛµË?¥!ºRýºWQ×N×Ñ‘uòs•HÓþ0V€™Ÿfk|x`ç[^7˜Óäd»vù× ÿ¼ÛOYþî£ÇéåÇ»òs•HÓþ•5V(A.+¾f]æëÀη¼n0Ylk¬4Ûõ–¯mD¿­}_Y¾œ8–® 0äç*‘¦ý‘±Œùç2/$Ô+88xˆ¸-ô¹Ð,¡UBB“•}Ó*sk0)¦ÉÉvÛe­jûüâÌšö‡± ‚0Pƒ¥aº ^ÈØ|ù¢±º¡‰….L7¸™‚±L‘©êÄ£vbª²„øZt_4V“ž´Ðw/Ö,c…òàÎA¨ÉÙ«7BCCÏ阪³l¾Ôûù¢±b}Üßš¹âi@{GÆ ÎþTúó5!¥Z c¬ÓÞß ÆÊçcÒT½,k¬’‚ƒƒï•Û´¦jŒíc`¬`¬PÖP=&´M•0TϨÛæ:*©Z®wn1 PìëÖkÕÅ ‡É©ž¡´ÿ帗,¨±îhd_ïçÅè/Û'±ÞVšª$¡FzÏq%̲‹¢-hG”8&§:”ø¾Òþç×<+Àû†êZ¡¯eß6³s?6Vy|{Ïu9Ì2]1U‘}‰FÂäT‡Þ#ZÕ›²Ã:ÇÁXÞ3TäI> ¤¡jíèþÁÁÁw²ÝçÒt˳ÊàÿÑ’.Vƒ³ã= CEá=S»tDÐT+Àó†*Pž9 Õ\a–:¸ë¹§õ·\™a9JѯX§w„ÍkÃã q;oQÚ½8føÅëYž´ Æ ¸#B|¡/ãÂôTY'õ°^¢vÁTË«JñúîýÐP˜« È\y#SŦŠÛ;i2E¼ôø.EÆ @uš® âeÎâp¡¶¸}Dî :ìà±dðϦ¦'iôó„±âûðËûWæµ*VÌg®xZpóÛÖ‚v>ZO UM|ôªsMOÿq; S•0åæâ; ÇoO¡îBí…š ÂXð†ùX¤žð244t4VoÈ}y¿‹ÏsÞ@Ÿ©‹Ðb6òâÉþ~ÉÚràn¶óËÈ¢°Ú´á%aFY³V<øs6 Y¦ª‹Û‘Û“³U #•é?™© Õ_¨ÐB]„Ú 5 €±àq„ñ) U°\þR˜¡¥A zGÍN?¾§¸Ý%T¬ÍXiO ©17\Ó4WèœxÞ'NléCÅ…éÿ“uT!öNàüäÀÝXèúæõ-wD¼e›2Þ?ü÷Ù7æ¯~ü¢rž+dœª,>OŸRþãBuYSõ¨T™­ê-Ä'w½UˆN¸Zè*¡ZNâå/Àã‚ ßÿ÷Æg™4Vk8[ÅFH®‡«5IÒ8-˜0aÂõšÇ’Þ²\ŸÂ¦M>Ïb}–?›¸w¸ÏråH?Àv¡B-,Öºž®B÷ =(3(}¥úAn—Ú¶}¤©ê!³U< Ø\ˆ§ºýñkà cu•Ði¹ÌöF袸õS×5ÆÊö䙎ŒUþ¤I“®‘Ë~êk¸ù½ûKÓÆubëªÁPi•:ØXfIn’æŠ3'<-Å5?½äÀ¹W½dû> Û›MÕB­„Y0 ÀËæjg¦„âÔõÐÐÐçÕÌ•žqrÁXÙ^¸¸ØïYÖNeÈâô^hF5kUÏb­é¹NfLnºC¨›Åz”äu“í|‹l÷ë¤É­+³UµðKà-c5W±/×ç ­ÔNßUÂXåðÞkgY˜ž¤Ý?¹âLIs™½j+{ž"ì¹U¤ÚÉvn-Ûýj©òs1¶Pþ<ÞÙ"Ȩ„††¾ÆGõq–JfƒÞ*T×]4Vç´êⱩGº©?â‹!Ïâ~INÿµfÆOæÒ`5”™>ä¿ä5•YÂÆ²½ëÉöG¦ €÷?~ü=rº®‹4VÊõή+~ŒÐ›ýe檸²ç¼’çÒ ‘…éÞ<Ò¯*¨5Wþ2ƒÅƒ| Ì @îW T€lo5KSHCÅGú½/ Ó¿ã‹!›ðcÔ’òƒ¼¦Z0T€†àààÁÂHe -wvdÜhæQþdŸ2T÷Š~'Ah›AŽô0ÝŸ8¾Í*yú„— \˜`XCÕLÖOåËzª ´ @Å •¿Ðhi¨&›äH?àûq‰ò€ ˜ÎP “…és«ñ4¦6UO ¥òes„îG‹TÜPñ%h¢ØT?ƒÂt€ŠªNò4Yrú† =fQþdÃõ|¤ß×Bg…¦âH?€Š*.LGé÷?¦TÎP “'÷\¬^ÈTÌTõJŠÆ%h€Ä3Ê_‚ P-}Cy¤_.AÕO-ÈkˆQ·i̘1…‰Z T 2jÔ¨ˆQÄú<¼ Q´qÎÚA—s×N§Cë’„ „r‹ ®ä­Ý{9oí̃‘/M›6"@4ymù¡ÃqNqö/ýEŒ~A‡×míz±U^1«~ ˆ…aô{zDEwV(U´íìÂìÈW·¯›qµ¯Ç(ú¼jíóüÐç߬rV¥ÜÈ|!RtXü0òc‰ŽÆÛUY ¢=ã¬í*Ú÷JNä‰ßSM_W(PªŽ¦Ãå ÕÊþ¢í²£Þ‰Q¡³çÒ—4pà} 4qê31Š>¯Úû¼€ÊÆÊ_€Ç©j]Î\ñ&e¯,?‚D;?%ŠìK´ ÑÌ¢¨ªâväö\Õ›hÛ8¢#ÑD9«èÈÖÙcÄWÐTˆ/n¤¼ðON;JÄçĨ÷côtòÏa¾£èóÐçà¹+céPÊ^VÄOs­?„ʼn¶|@”¹˜èÐzñ¯cTUå‰mYK‰vŒ'Z~7Ñü6D鳕Ž&9jêG⫸AèZ¡ÆBõ4M§èÀÒÞˆÑêÑÜøÓ51ÚD¨¾ÐUfŒQôy†éó®j>øíO™ óéàBÑÁÌ!ú¡!Ñž©¢cY+:˜…§”·†(ùKk{§Ï¢¢ŒŸOwjß²»øJ: µ–ÿæxàòÇ?8§™‹¶!F«7F¯\TüÒÓ={‹¯ãF9 6“1ZÇL1Š>}žýç–6geÌ'Ê]cýׯÌAñ·Až·sòWÖvϢș†Š¯¤›P'9p5–)òý®0}Þ]ˆQcÄèŽð ÿ•1z³Ì^qæŠëej£Ïƒ*OQßÑôy­+Òç¡Æ xœÊ¥ÏþZIÍrªvI¢œ•ÖT-äq}Gx¢mcéÀ†ÿD‰¯ä~ÙÑt”S.A2#Pc¹œ6ëĨ1bô·Äo’dŒv—™«–B Ì”µBŸgè>¯…ìóp®5`â)–´™I”ñ“µh3q4QêLÈÛÚ¢wžÛ3ûøJê!t›Ìpqg@MN_Iù_8bÔ1zyÿ¼ â+yHÆèíBmÌ–YEŸgÈ>ïÏBe¦¾Æ÷yÀìÆ*%¬€²–[S³œªM ƒ¼­ ”ö/Î\vQ|%}„þ"ÔUèOš©–;xeßw»£ÆˆQÊ^NÝ:µyZ|-=e–¡½ÅZcšé@ôy¦èój| 0³±Ú;('ÂzXìÁe¤¬CÞ·;·n$‰¯¤¯P/9ÕÒÁb-®ÑÆJ´QbÔ81ú\ÿ;_’1z§œ¾¹Æb=¢«6ú<¨}Þ#Ò¨w·1ê~ž(ÀeÔ ·ïvõz`Já&w2|ξåu/‰_Þ›¯gXiÚ_c¬îôUcÅ׫1ú†¸ r1F³ª3FµrW¼Û[6CŒ>×·++>:ð.‹µÎªyu+3õy™‘cè/ÝÛSÿÚUŽ)S÷Ÿ5¬Ïæ´Ú e£%ô)¯;ìdvn-&ä ç[^÷’”ŽÁ‹¯gXiÚ¿†« Ÿ| »©BÇèY¾£öž·n@ÃÇès}o7š±2MŸws»æ´èó¡t9鳚ÝÖ°>øÆÀ5Fˆ¤Š„ =¬ÛÉ$M&Ê ·9ßòº—¤t :ÛÛ0†¼»=]¨ÜòººïTÌ8zøžÊòÆÃežÃѾ ‰ŸÒ]©~Ý«¨k§ëèȺ˼3_§;nlIµýü¼Ú¶í_S:™ààà!še­zR/ë Ú(Ëh1ºâË—èîÎ×+™‡Ö-®¦yŸ+‡ýﻩ$+¡÷\zËÚÌØÙ͡Ԯuº¼cR™×½´uu¼¡™²¿ºbÔhÆÊL}÷MÚ¾‡å컞?i°cÜ7Ù‹¡Êö™Õ¦Øçó+¡ ›‹•!´·Äm£’N†9æùnr¾åu/Iùëlýé;iʈ>Ê2ß¾ùÌÝ%ûÞ}±­ž6DY^ôïçÊ<‡£}¾üýçÝ~Êòw=N/?ÞµÌûÜ÷6Ê|Ï«Ÿ¿Dšö¯IŒˆÃhÍ—ƒäµšÍ2ZŒ¾ÐïvÚ·x„²;ó5e@S÷q¼~=j]Þj÷¹\Yþç³÷Мñ-óSßëOãþÞ«Zcô¹¾·ÑX™¢ÏûåaÈom]ÒO¹ò]7¨@Ù#ÆfeûÌj“ú<ÔXot,ù6ëýt:Uœ6ÿN¨³rý¦Ì%Ö ç[^÷’”¸ÎöÆ élÌheù¸Ä P²ïÚ¦At9q¬îs8Û÷ÛÚ÷•e¾ö9ù~E[Æxõ³—‘¦ýk˜±ê,³ z1zAhÐýÿNQuƨV®Ä2ǯ6õîãÊrêâátïm­KÖù9Ûµj\ÇÕ£“^ê0ÒhÆÊ,}ëÄú¨ûÍ-鉞7Ñ©_G9ý®ojÓ”¦¼õ]Øü±Ã˜«LŸ‰>Ï|fˆƒ ‡ªWErÐzX îM#¨Ì­—¤üÀ]Ø^§¶þ²í}í³ kû9^“¦ý‡ 6ñY¢(ž¼<Ã/Ûh1š=ÉB/Ýk¡ÖXÒÞO[ŽâÑÙ2ëá›-´ýcëòŒ!ú×CÕ£¼5t9ú¼ªéÂt }ó¼…Üæü»N µPöº¶¡…¢Þv-n\í3ÐçÁX3M¦êt.y²¸³tšÅ€Æªq= f]æÛ«ë–îãÌÞs8ÚwCkgV‘÷N¦Z¦sA{pppMŒf-Fo½ÎBŸÿÕB|]þ~<}çcÅ)8^¾¹¥ÕÐUwŒ>w§Å¨S†ïól¥5=ξëÕ#¬±¥+•í3ÑçP¹BNVœ¨žÑ- 6 ±z³§…¦Öx«Œ±âç=òYÙÇñ ûõ` ½zŸ1bÔ ÆÊ}žV? ³ÐÝm]ÿ®“ƒí«Êö™fîóPc¼Vc%=.úÚé¡ìÕl¬ÊÕ°ˆí'þÏBv²þëâô8¯«Éœhí|Ú5³Ð†‘eÿ9ÚÇú¸¿5se;ucåõX ’™®£š+À{ĨáŒÕ¼W­Ydï>l¡æ J3ý;;Ž3{Ëœ•°Û©ÏZïÃSB0Vºñdº>/ÀßB}oµPîçßµúî»ìMV¶ÏDŸ€ķòä‹Í\¹¿‘Òâ•6u^‘}†SÍ3VïÖNÏÕXAœmøk7ãĨ•Ïôyžþ® Ó/ÂX_ÆlÆŠ3üoÿu=qGéô‹³}0V¦ŽÑm¬º·±PÒ«šÐçyâ»6d¿ˆ>Ï«ÿ<È[¯#4ÜfÛëÞz}ƒu2ûºõºMqÃkÜ ež¡´ÿ帗*Óɨu%â_{¡Ð~±<ЗbôJ˜ebÔ1J›†S×6–¿šÜX¡Ï3yŸ§-Æ2V16ÛVšÙXU6È”A+j€õJñƒ¯%¾¯´ÿù5ÏŸ¨¬±Ò,wòµGÄh8bÔ1zù—gÔÐ´Æ }žùû<àc5iÒ¤kľ_…Nó-¯«û&OžÜX^ã|hhh°+æH+>_P;¹^OüÓ_bûX±(ïwNìß9qâÄ–š}OËÜb›ÍÞöB‰œUàýâ½¾èÊgpôÜÁå0Ët¥ƒ‰ìK”0?øêPÂ{D«zSvX縪+FÄÉEí¾ñãÇ÷·»8&]ü=EÊ8%Oü*JÑw–QˆQcÄèñ:¥šÝX¡Ï3ŸÜ`¬ÄöÂp|ÈË|+:öo5ƒÈÿ =*÷ ª€±ê'î?V>îy¡çtŒÕñÜ#åëpqä,Íëž™0aBÛç¶·]<ªšøH.ÚäúN…s;‹&aÊÍlìÈN桞BÝ…Ú{ÈXÙý=Iä¯ó·ý*£éã-/]™ÛúbÔû1šúeǵ ,í „×˜ÍX¡Ï3tŸ×T(ÆÊÃÆŠë>45!Ÿpˆæ1sea¸~Ûf\˜†ÛÃÓ€z¯/žï#®'qò\õ Ûí²è÷v9ò¿Öĉ[8û ®¼7t2ÄMw~bYV»€6¼$~ £¬ÿàø‡Àÿìð«êâväöän #•T¸ü×6@ª¿P¡„ºµj⬓©¨±rò{ú‚cÎö1îü-T!F›Ä¼gùÛÅokFŒz'F/ǾYûqý¹ÒTÙÆhW¡všÐLÆŠßo3ôy†íó`¬Üh¬lÅÛ'MšÔTsÓ:^×<¦èðSÄm¦èü{Ûfª2å(·M”ÿÖ‹íLÑåØLènç£e¦àf²æ˜+ŸÁÞ{p~2ˆ ]ß¼¾åŽˆ·,cSÆû‡ÿ>ûÆÜâÕ_TÎùbðFÑsFþ=ò9[øðb>†‹6e}Á£Rýå?7žbáK¼Ü*ÔZèj!6þµÜe¬œüž8ƒ©kîú-T1F¹Mn]øºå½½!uùñ¦¬¢ÕÏ#FË+fî( ÿïGT°î_.?æÊ¦· /F >•=£s|ø;AÓ:6WÎYõ¨FjŒþYè6¡ä÷b¦P§ÆfîóÌ Oõy¨±ò®1ëÇuLšæµ2ãg¨Àã*d¼u„xj¨…Líó?Ñû„”ÿ&újÔψ’}?Jm×>²ƒé!Û¿ƒ¬] ’ßOMF£ÍåtAÙV½eÛ=‚-«;î¸ãÕwß}7~ܸqç_y啚6mú”›bô>£eŸÑ@~?µLO \èóúA^éóºÈßµÚçùÃÑT¯9%Ó¡puz Ÿ¡BŒšW37ÉŽæ^™¢í)k*zUrÐêmBõ’íû€loî`¸ ¸•ü>PkP>F[É6ⶺGè~Ĩ}õë×ïÝQ£F%;öäóÏ?ÿïÀÀÀ‡«£]eÑZf}Ì4 hOÍÚç™XÎúÓç™\Ýd;ß"Ûý:ù»FŸ| ?MGÓH¦d¹ól#°R(9hu4™Ô6åöm+ÿ9s»_­é`ðÏ­|ŒÖ•mtMŒ¶GŒ:Vƒ :ýãÿøpìØ±‡„ÁŠyXPÉmä1ª×çµ–ŸÓбdb¹­ÏCð8n 2?ز³i(ÿEpqs3#KZÍL¨¦òscÙÞõdûã_›ýåiœ«£•W×®]ÛŒ=úK>€A¬Ï=÷Ü]ˆÑú>£¦íóL,ôy FN¹¨ƒWðòß„a5f̘ Fv( Û[ýdž1êq½üòËmÇ7G¬³üþ tm ŒQµæÊßLñdb¡Ï5zðR0È;ª…Î¥R1Š8­¢>þøãnòBôùÂh½) ÖU50FKèó*b@A+Äh•ßãÃBÛ„’„ÑzFï,ü$VQcdþü„(ˆQ·½×'…ò¤Áºß`Ð1Zµ÷(LÕ[Ò`ÍËð--£U{ß|™£Ï… „>j„o0h€­Úû¿VhªÐñ+øVA5Æ#j¬‚ ƒ@ŒúÄçè"´îàÛƒVZ F½úyø 6XB½ð TÍ\ù ½, Ö*¡Îh@6ÄhÕ>[ ¬»âú«É(p^ˆ9ÔX™‡??j¬b´ú?c#i¬Ø`æ# ñÍ-£U€ÏyÅç¾’§h†o0h€­ºÁºW|î(¡T±<Q´@ŒVý³?&¯A-Ô ÑÜS¨±2 Z1Z³ "Ú!Kh9 {Ð A+Ĩ)Ú!HA˜/ ݯ5Ø[¬yMp“Áj$/‘“_GEûç¬t9wít:´.I¨@ˆ ·¨àJÞÚ½—óÖÎ,<ùÒ´i#D“×ÖÈO & d@Œºyábi°¼zaqÎê¡”™/DŠ 3Kt4žèبÊJígmWѾWr"Oüž²x¸húºB|­I6Zu4&«"¿'ÔXwÚ¨±1jæö¹_·§ =éé×»œ¹âMÊ^Y$$þD;?%ŠìK´ ÑÌ¢¨ªâväö\Õ›hÛ8¢#ÑD9«èÈÖÙcÄWÐTˆO$$MVd¯À bÔý¬gä%rø4 ÷{$S•±t(e/+âAž2æZÿʼn¶|@”¹˜èÐz¢üMPU•·Ž(k)ÑŽñDËï&šß†(}¶b®’£¦~$¾Šë…Z5ª§1W Z FÝØV| Âw„òä„­ÝõÜíO™ óéàBaªæýÐhÏTa¦Ö Sµò”òÖ%imïôYT”ñóéNí[v_IG¡Ö2ƒU_ÈY+0h€õL›Ê#]:‚088øN–ÃlUÚœA”1Ÿ(w5SŦêàbR¶Až·sòWÖvÏ¢¨ïG‡ˆ¯¤›P'i®8sèJÖ 5VÀj¬@ŒújÛµÖ\"‡3YvŒU™å²kÀ(}ö×ÊtOO-éB”³Ò:=yG\ÓÞƒhÛX:°á?Qâ+¹_š+Î\ñ´`ÌZª¹ã A+Ĩo#S”½#Ŷ¶l`…’øtºÆ*mfeüd-TOM”:ò¶¶‡(íçöÌ>$¾’…þ,ÔÙb­¹âïÄt à%ƒu¯4OÉ|¹›ÌIqmV¹Ì¥„PÖrëtOO¥„AÞÖJûg.»(¾’>Bê*ô'¡&§ÈÄ(p¯Á" ŒVk«4ÆŠ5¦œ±Ú;('Âz*€ƒËHY‡¼+nwnÿÜHžD¨§²··X‹Øë:3V¨±Þè´Qcb´&¶«¿0UoÉú«(cEÚŒ–b¬¸XŸg‰oy½”9†þÒ½=Õñ¯Íq¡HÝÇËß|òL™ûÏ÷l¹ûØ“í}ø5:Þp ­˜öZµ}Þ2Ò´¿x}…z ±1î ÔÌcÀ £ˆQúŠÐicuV{ÁgÚý¹µ€šv¾åõjÐÍíšÓ¢Ï‡Òå¤ÏÊíã·ù—îíÊl{¼ç-VÓ¤ó\®lO ÿ€®mÖ Ú>oiÚÆ Z FÕ®ìdª´ÊRÏ…EI“‰²Â­;ßòz5¨n@:²îcÝ}ü6‡ èJ™«>PÖÿHO}¨³Õ(Ù¹¿+Û®ò¯¶Ï[Fšö‡±ƒˆQƒ6DQ_¥ño>¨¬ÿ4qýZO UM|ôªsMOÿq; S•0åæâ; Õ#B=…º µj*c€­ë•ï÷ ]eðÏÐN(&88¸?bĨQ?‡Fç…â„6™±â»ÙÎO,#‹ÂjІ—„eÍZñàÏÙ,d™ª.nGnOÎV%ŒT¦ÿd¦j€T¡>Buj+ÔD(Æ cZÃ…r„ay«ßßyg÷ï/%44t¸/:Ĩ!cÔös°z]èÜøñãïq×kx?9p7º¾y}ËoYƦŒ÷ÿ}ö¹Å«¿¨œç §*‹ÏSŧTà£ÿ¸P]ÖT=*Õ_f«z Ý+t«Pk¡«…øF-'±„+àñN5VúÛýÄ`µ_ÜvÊÔš–É“'7ë‘j†ÈÙv±(4—±oçĉ[j__l{T¾Æi±¼lÒ¤IMmÿá;t´ÏiûùÄÀÕSÜî*vô>bÔS1jïs°!Û#4÷yZ(cU½E^ÃÃð€]G¨P ‹µ®§«Ð}BÊ J_©~Û¥¶miªzÈlO6 òG@õZ!zÛCCC_þ—²óÿR¬ÿM3|+?›ABw»XŸ"¶”÷yC¬Ï²´¾U2±ÞOh†+Ù Íë>"î—ȃŸÞ`&´`„ ×;{Ÿ1ꩵw?±-ˆÍœæý±Ú¦"Y;/+u:°±Ì’Ü$ÍgNxZŠk~zÉr¯zÉö}@¶7›ª…Z 5²`Ãf{ÕžoyºM³ï”ž)q°=_üÿFÍ2ð¿~{†ÌBœ©è€Âqßíâ±áœ•°1Vþ®¼O€õdŒÚ»gÏ4÷IñCΠÐXi³Võ,ÖšžëdÆä¡;„ºY¬G©AžQ7ÙηÈv¿NšÜº2[U =̈M…¾·Ù6ƒ§)är±ç²·lTìä_|qe93Üfj…\}Ÿ1êÉÕ»ŸüCpXsŸNB›ÙèqfÌ€ÆÊ"³"ª¹âLIs™½j+{ž"ì¹U¤ÚÉvn-Ûýj©òs1Qc<Þi£Æªü¶í: O‡ìTÛÌ6 äd{Ží?píëOœ8±…fýªÊddÈÕ÷ £žŒQ;5VoÛD¹ýQmßdÀZ@?9˜HƒÕPfN¸ö¬ä5•YÂÆ²½ëÉöG¦ #Z²Ð{¥ûFòááB_„††~¤³_w;oãº{¯ÏÅÀꔎðYÐçAˆ'*B4‘ZÎ¥Aé¹…Ó÷ç% A5Bg…RÅïö¾Ì?^]´nûÕ¢[¨m#?_‰¢ý‹sÖºœ»v:Z—$T D[Tp%oíÞËykgŒ|iÚ´:±ä“|–”ƒ…CÓrŠò…ˆ•‘WLQÎÑbÊ… ÈçÅ¿õ¬#ÅÊo?ÝÚœMJ=ýÑ}6]D]!¾6gÍ hjŠsV¥ÜÈ|!RtX˜üX¢£ñDǶ@UV‚hÏ8k»Šö½’yâ÷”ÅÃ5±PÙxBð8U ²äÌ‹o¦d¥fÑÁCÅôë¶‹ô}Äôï¹çèã°3ôá·ùºø·Î¿ùÿ†ÿAë/RæábJÉ*¢Ä='ÃD7ÑTˆO¤1X¦Í6\Î\ñ&e¯,ÿF¢ŸEö%ZÐŽhfÑ TUq;r{®êM´mÑ‘h¢œUtdëì1¾O”aWFáÐäÌ¢¢”¬bÚ™^¨t¬Sþƒ"ã/RòÎ\)ÿb!òmeä‰ß|¡øcu‰¦/9G“E_°#µ¸oX»éàtÑ]Ü ÄGß6ª/t•3WÅK‡Rö²"ä)c®uð_Ü™hËD™‹‰­'ÊßUUy눲–íO´ün¢ùmˆÒg+æ*9jêG⫸^¨…Pc¡zs€‰kª¢É÷Kù{2 iGZ!Ï\(LÕ¢í™*ÌÔZaªBžRÞ¢ä/­í>‹Š2~>Ý©}Ëîâ+é(ÔZf°8žü‘µ¦f{ÚùAIû…‘Ê)R2Ulªödoƒ ¨f‹û‚M{.)}Cºø³µ |ëE·ÑMèf™½j"ëej›&[•6geÌ'Ê]cÍT±©:¸˜”mgÅíœü•µÝs£(êûÑ!2ž:IsÕXN :ÍZ¡Æ ¶ÆjGzá×ÛÓ iý¶‹ôÕÂ?(%»ˆx‚ ˆÅ5Vß.;Gk/ÒúøÃI¢Û¸_¨»Ì\µj`¦¬¥ÏþZ™Žâé©%]ˆrVZ§§ ïˆkÚÂ{mK6ü'JÆS7™¹j!k®pi2`^¶¦&%¥)…êQ I¬C•Ѻ­•‚ö©—.ˆnã!¡B· µ©H–ÁÆ*mfeüd-TOM”:ò¶¶‡(íçöÌ>$¾’…þ,ÔYN1sA{¦iÙ²¯°`o¦up×þBëAe´+ÃzP˾ƒEÔ©S·§E×ÑSfÚËÚÓLRJXe-·NGñôTJämX ´q沋â+é#ô¡®B’Ó˦1ê”#>ù¥e)‡Yï;XH¼A¤Õ¾ÌB¥à¾âá¾Ï¼$ºŽ^BwÊé›k,Ö#ºÌa¬öN'ʉ°ž àà2RÖ!ïŠÛÛ?7’ÄWòˆ4êÝmŒºj¬€)k¬âv_">wŸÃ†oy2®x\`ùûסÖ7t É_-uùqzËî~_¬€€ºt{×ûhêŒ(»ï½ÃM·—ÛWÚ>¢·ÕXñÑwÉ:«æ¦2V\¬ÎƊϳķ¼yWšö_I_Qï`±mêÔX`Xb’.)Å©Üiò-¯CÆ êòÜå{¨IÓ~œ§ß×ú­géý1ßP`ÝúôÝœ¸r÷áýo¾;Åå÷U¿´}„éÕîÏ­Ô<°ó-¯CÞ•¦ýa¬€Ï½ã’R7Á&ßò:d\ñ¸ ]¯sU@Éòòõ‡¨ë]½¨~ÐÕÊ-¯ë=N»¼2ú(Ýs__%‹ÄÛ#ãNRËV¢ Û.”yu[Î*2ÞïÊûb½=êKº÷þþvïÃÆ ß©9¤í#Lo¬’&e…[v¾åuȻҴ?Œð9Öo¿H{e§É·¼W<.¨Ë V ‡}¾d}ÀӯѰ”e¾}ü™×u§]æû¼5j*­Ûz¾dÛϾAŽÿ¡Ìë¾9òsú÷O\z_ªVÅžPÌ“í}Ö$œ¡·?üŠ^xõC|§&‘¶0½±âÓ,pì|Ëëw¥iÿÊ+ÔXÃÖX­Ýz‘’3­&ßò:d\©uJ_CO¿ð6­Øx¢d_PƒÆ%ë«bO)™+íãô–ù1¿l9_æ5¾_´›nî|wÉ:ïç,Öâ_9|_zÛ9fûÞYí:ÞN›Nã;5‰´}ÄS/4µ±âkÖe.±ì|Ëëw¥id¬€ÏÁ劸‹¤½…Œ+\ÝçW»Žî>ír-¿ÚºÏÕ¶SoúÛèXe¹ï _ѽ߬ðûzûól ººe¹ûŒúæ4=;"œ:ßó<¾S“HÛGÜ|çSæÎXñ€¾i•¹…¼+MûÃX+ȰÆ*°^#zwj¾²Ì·u:5Võ¶ ¦Ÿ*÷\ƒÞZVb|š^{½9a_…ß×Ã>£Û{ µ{ŸÚþøNa¬`¬`¬`¬ŒdLcÕõ/è瓡Êò_Ž¥.÷¿âÔXÝýðêùD°îó±¡êóìeÌ‘+ï‹Zÿ!Ó©A£Ve ™6cõØßþ«ìÇw ccc…+àS5V0V¾c¬xê­ÍM=•LOåñº3cÅ™­v·öQ¦mŸû¡g¦(Û†ÛîÒûRå_§.ÝÔõ ú{ÈNÝûðk±i{þ|§0V0V.ˆßvEÖ‘±+È€úë?+ÉvúN+´SÍ3V·ÝóÜ+0VŒ0VPuí ]è•7¡- 2}D¿§Þ cÁX`‡±ÿ;KË¢/(×[{ƒAå´<ÆÚGðí}¿arcU@±¯[¯U7&§:û†Òþ—ãF\Bð¹«Ï查Y(W®Úr ƒAå¹ù¢ÒGÌ]sŽî¼û~S×X] ³ì¢¨D Ú%ކɩ%¾¯´ÿù5ÏŸ@Æ ø³#­¦ê{a®VmFÆ ‚ òZ‘þþMØôÆêr˜eºbª"û%Œ„É©%¼G´ª7e‡uŽƒ±>GTây¥ã\µé"}µðÅ`a Hªo—£ÎZÍÜczcuiºåYep‡hI«Á‚Ùñž„¡¢ðŠ©]:"h*Œð9R²/ÒøÎÐâ ”ÌÕúm—hâç0 @¤ôë¶Z§—m¼@_}ezc5­¿%àÊ ËQŠ~Å:¸#”h^+oˆÛy{ˆÒîÅ1Ã/^×Èò$j¬€ÏÕX¥æ^¤Øg•ÂÔ;/Qð̳ôëöKÈ\A2UŠ©â>!zÇ%šò¿dšþà Ó+~ŸS-¯*Åë»ÿMôCCa®& såL›*nï¤ÉñnÐ7â»x+às¤æ\¤P䦓4iÎYÅ\ñ¿Sž\¹é‚RÐÎG òaÖù¶ø¨?.Tçš*žþã¾€MÕ—óöÓôïWh•v ¼ÆlÆŠîÃS,ï_™×ªX1Wœ¹âiÁÍo[ ÚùhA>%T5ñÑ\¨Î5U<ýÇí,LU”›ˆï`€4Võê.Ô^¨©P Œ0µ±:Ypžò§•чĿÓZ¸^*ѱ~/älþÁCï‹ëü›çl×T-Ûxžþ=s·ÕT}Nßü°’îºç!¢ëx@¨«P;Í@h&cÅï·ÙÎO,#‹ÂjІ—„eÍZñàÏÙ,d™ª.nGnOÎV%ŒT¦ÿd¦j€T¡>2žºµj"cLKZî%:yú>zŠÒ2r(q[2Í_™B_ÏϤ¯þæDZÏs…óäû 9Oóל¦¯ʦ/¾ßF_ÿ¡d©T…ý¸šî¾ÿÁçE×ñg¡Û„njd²ÐO¾ßÆB×7¯o¹#â-ËØ”ñþá¿Ï¾1·xõã•ó\!ãTeñyªø” |ôªËšªG¥úËlO+ß+t«Pk¡«…®ª…+`Ê«ô¼B*8s‰Ž?C™9ù´;y?mJØAë~£ˆÈõ´bÕ/´|eT‰–…G*Zª£%¬å´¬T‹íh‘ŽªZêDK"ég;Z £Ÿ´Z¼Ú¡æ/*¯y¬…®i®Žæ°~.¯µZà@?­¦Ùå¡h–3Í/Õ:ú~^yͬ€þ7·¼þ«jN„ WÑ·³ 3è»ÙŠÂæDÒÌùké‡ú?#³U…Z5ªãl 4µäûm ßùyîzPfPúJõƒÜ.µmûHSÕCf«ÚËz½ !ŒêÀ´°±:}®ˆŽŸ:O‡ò9k•K;w¥Rœ0W¿nŒ§5ëb(ò—hZ½fEDýª«U¬È²Z©ÕêR­ÐS„¾Âíh¹V«¬Z¦§•åµT«ëK´DG‹)¼¬Ùj¹U uô3k™ëZ ÕR«~*£uŠæ³–8Ñb«æéh®ÍQµÈ‰®£u4›õó:š%ôý‚µÊà ™GßÿÄßÛzšµpÍ]G}â)œ›dv¡±É¦Uc¥N6–Ÿã&i®î•ÓR=eYoÈíê%Û÷ÙÞlªø ˆV&Ì~ c¬Ñ™?.Ó©ß/ѱç(çð JÏuj'Û¹µl÷«+O¨±Æ­±’ÆJ1WgÙ\Òo§.ÐÑãgéÐÑ%ƒ••÷eæ£Ìœ²: Uv©2ô”uŒöë(uЉ2Qš¥(¯­2Ž–hŸŽöî×W2+½¬öØÑníb¥•W’ªÔRí´UŠžòí`í+«í¶ÚkÕ6me%—W¢ª=¥Ú¢§Ýù” £xÖ.«âv¡ØG(òåSìΣ—tŒâ÷œ °y‘·Èé_È,øÉÏ VC™9á#›AQS™%l,Û»žÅêTàú]Ñe%sUp¶ˆN)¤§/Ò±“çéè‰?„Ñ:W¢|U¿•êˆžŽ£Ã::¤êhYåé(׎ròË+[«#gK”¥£ƒ‡õ•y¨¼h•gU†Žö³rË+]«œR¥Ù*û,¥–ÓE)¬¬²Ú§ÕÁRíÕQrfyíÑê@©vëhWFy%©Ú†v¦Ÿ¡íi¿ÓÖÈç”zFѶ´³´cÿ¹9£½4$¾2ª5Wþ2ƒ ë¯êBQ T€lo‹'cU¤*­N œ-VtêL‘¢“Zý^ªz:]DÇuô« ¼Žiuʪ£:Ê?Y^G´:QX¢Ã::t\_y¬ßÊ*×VǬÊÑQ6ëhyei•_ªƒZ±*³Œ.):À:\V¶:dÕ~¥³òÊ+MUn©Rõ”s‰Rt´•mUrÖEÚy‘’@5A»2/QbÚé?ùhwXKÊòšjÁPŸ6V§Ï•WVgKuJG'Ï”× U¿—Õq[¾,Œ—¾Ž”×Q­N—(_GGNêëð‰ò:¤ÕñRåé(÷·òÊÑêX©²mu´X.[):ÈÊ/«L[±ê€Ž2X‡Ëk¿ªC¥J×S^‘0^å•Êʵj_N!íÉ*¤Ý¡š¦¤¬ mÑs³–¿àñ ã´*fêÔ†êw'†ê´{ U~ Õá“NÌÔ 'fª*†ê¨ž¡**5TùN •3uÀ“fJª¡½Ù0T0V0Và’±ò”¡2DvÊ‹†ÊײS)9E”œ CÁX€KÆÊ™™ÊË?EI»’).nmܸ‚ ŸR mŠßN[÷äÁX@•U^‘ÃìTú\Љ‰ÁàA5@ñÛö ót Æ ÔXÃYš4VzÓ}‡ŽþN1±±ºpbb"%''SZZ¥§§»Mü|fPjjª)”’’b íÛ·OÑîÝ»iëÖ­09Õ¨ÄÝ90VPYØXÙ«ÚœZ®ÓåÁïØ±ctúôé ©  Àc:uê”ÛtòäIéĉnÓñãÇ=¦ß~ûÍ#â¸qU‡VŒ;²¥ÞWì¦+¨²±Ò)DOØR6spàÀ˜ƒš–Š—ŠèèÑ£nS~~~…ÄÙA˜ï+)ãŒTÖXÙ;÷T|ü–’Žv×®]0->h\*¢#GޏMœ‘rU;wî„Ùñ¶±ÚÆ ÔXÙÖXÙž*Ak¬rrr`Z|дTT‡r›òòò\gJav`¬À4+{çžÚ,Õ¦M›caVãÓR5åææzLlØ]ÑæÍ›ax`¬À$ÆÊÎÉŠ±²sÝ>ÕXmß¾Ý'LKue[*jf\1!•‘jRšUüZööíß¿ßmâ×qtÒXc¦2Vö.„¬5VÕe\ÜiZÜiÑ3-U› ­éxõÕW©AƒÔ±cGúꫯÊìçh>ñÄT·n]ºå–[”o­Y™7o]ýõÊþI“&)&…·«rv|{÷Ù³g 8°äuãââ”óMuïÞV¬XQæ õ .T¶óÕõÃâ×QÏ?mÚ4ºöÚk©víÚÊöøøx+0§±R •­±âú–ê4.î2-îδ¸óR>¶f† Ç;ï¼C#GŽT–9k3jÔ(e¿jHþþ÷¿Ó‡~¨,‡„„ÐSO=UƬ<òÈ#ʙˣ¢¢¨iÓ¦%æEkdÉÞý† ¦¼./+¯Ë—¥ £Ç{¬Ì¥júöíKß|óò~ÿ¼Mû¿ŽzY›úõë+æ,ÖÎ¥” +ÔXÃYjnQ9CuTJ{T ¯O\“Ð×öÓš™6mÚ(m¯5*ª a5kÖL9/ïÝ»WÉliïÇ™Fíºz=>í²#Ù»¿.gœx™³füºê¾víÚÑúõë•÷³víZjÛ¶­²¬>†—9ã¤,ó‰gùuȶ×_]y, Œ˜/c¥1VGµ:U\b¬xÐóÓâÉ »bT*jfx:Lo?–vZåççWfŸºl»n»O›$­ø~¶ÛÔí¶¯«îûä“Oè•W^QÌÓË/¿L}ô‘2 ¨÷uçuuyΜ9Ô¹sgjÒ¤ }öÙg090V`>cek¨XùcÅÓ2¾`Z\‘žáp‡ô Š=Ó¢.s=›ÛýlZX-[¶T¦iÕu­´÷³]×.óóÛßOo;¿.gÒÔõ¤¤$åÈQÎqW«V­(""‚Z´hAëÖ­Sbˆ—íe¡´ÆJÕ”)Ss“cæ3VÒL©†*߯X©× 4ªi©ˆqqEzF¥²rd\œ™™gžy†&Nœ¨,ÿúë¯4xðà2ûGŒ¡dˆø»±ßÏÞ:6ž®ÓîgsÄâZ.6I,~ (>9'Ÿî€ ÉÙ8ýãÿ ÷Þ{O™ºÓ”9SÕ¾}{:thÉ6®ãz1WÕ¬Y³`¬`¬° j¬€aƒL5Vù:Ò+ž4»i©ˆôÌJe¥šWÄ&C]fãÒ³gOŵnÝZ)×îg½öÚkÊQt<µÆû8ƒÅÒš"–EÖ1±9úâ‹/¨^½zJÍg#Yz&ÉvúNk€† ¢d¡Ô×Õ>.<<œêÔ©CK—.-³ÝÞcl—Y|?LÂX€)3VZ3uäd©´ÆJ=:Ð̦¥¢âì«R§ÂTq[±±ÑJÍü¨b£c+ÎiÅÅél€T©&È^¶¨2b¤Œc•$E+­¡²g¬Xœñ`áMÓ¢•Ö¼821ŽŒ uZK+­a©FO|!+ºÆÊÖPfÐ7Vª8sÂf„ Š6ãbÏ´Ø3/¶Y‚±À¨±† 2­±R •*GÆ ‚ +:ÆJk¦T‚±‚ ++¨¼±:d£Í›a¬ Æ Æ \7V9Ee ÕñRÅ'lÅ A5ÑXeœƒ±†5VÀ°AVb¬¤™ÊÓhÇ®T 2Tû)Á®©‚±WŒ•¡R•‘÷;ÅÄÄb° ¤ÄÝ90VPycUXÆLå²~+Urjª!Šß¶O˜§K0VPUcek¨Tå¥gŸ¢­ÛwSlÜ& >äsŠ¡MñÛiëž<§¦ Æ ÔXÃÙ>a¬ôÌT‰Ž•*ÛVG‹)«œŠdå—U¦­ŽXu@G¬Ãåµ_Õ¡R¥ë)¯ˆÒt”ÊÊ-+žMÎ.t: @c.+— ÕQ=CUTj¨ò*fê€33u¸ fJÇPñgOÎÂ@ A0VàFc¥g¨|6;%´7»öÀPAŒxÄXU×tß᪪Šd§¸–l/¦û Æ ø¨±† 2ÕX¹:Ýw°ŠÓ}ÍNÙ™îCv ‚`¬Àk+L÷Acî2VŽ •‹Ù©L£CŒÀX";AŒ0¨±† 26%F1T+Fǹ§ Æ +£Ccn6Vö²Sû2ORâödŠÅ%m È·/icU6VŽŠÑ“öåÐÆ˜ >„‹0ÃXÀ+`Ø +1V:Ó}©Y§)&&V·NLL¤äädJKK£ôôt·‰ŸÏ JMM5…RRRL¡}ûö)Ú½{7mݺ&§•¸;Æ ª”±²S?µ5)¥\§Ëƒß±cÇèôéÓRAAÇtêÔ)·éäɓӉ'ܦãÇ{L¿ýö›GÄqãª>¬÷dK½®ØM 0VPce¯}S|b™÷À0-5-5.ÑÑ£Gݦüüü ‰³ƒ0;ÞWRÆ9+¨Š±Ò;º/nsBIG»k×.˜4.Ñ‘#GÜ&ÎH¹ª;wÂìxÛXí? c j¬€aƒŒ•½S%hUNNL‹š–ŠêСCnS^^žKâL)ÌŒ˜&ceïÜSª±Ú´i“b,Ìj\`Zª¦ÜÜ\‰ »+Ú¼y3 Œ>{¹½“yªÆŠÒ‚qñ]Ó⊲³³=¦¬¬,§â£Pax`¬ÀÆÊΙÑUcµcÇd[Lj\\1-®êàÁƒSff¦CmÛ¶ †Æ €Pc dl¬ì]j&nS©±‚i©œqM\¢ÀÀ@ºóÎ;iÞ¼y.—iÓ¦Ñu×]§<¾*Æ…ï̼ØÊÞc¸æ©2âçs´?##î¶lÙâÐðsÃÁX@õg¬² í^Y5VÛ·o7ì‘ѳ-Zs§˜8q"Õ«W–.]ê’iñ÷÷WÎçTY3£55ªIaƒçÈĨÒ>ÆVû÷ﯰøùô¶;;i¬+GÂXÁX€qŒ• !kUu—ŠfY©ªæ¤2Ù=s2nÜ8êÕ«WÉúÞ½{é‰'ž ºuëÒ-·Ü¢j«FD•jB¾ûî;ºýöÛÃuíµ×Ò_|a׸ðºjNÔeís:34öî“@÷Þ{/5hÐ@¹/9#=×ãõèÑC1oo½õ–òê>í2Ÿa}àÀ%Ÿ966V9S|÷îÝ)<<\Yæûðsóg¾í¶ÛhíÚµÔ§Oå¹;v쨘S++0œ±²5T©¬ÜRcÅõ-Õi\\É®¸ªÊdZìÉ•Kô虓¤¤$ÅP¨ëÿûßiôèÑÊrHH=ýôÓºf„õØcQDD„²ÌSŠlnìÝW]g“ÂËêen´ËŽdï~Ï>û,½÷Þ{ÊòÈ‘#iðàÁ%—¦ùÛßþFaaaÊòÔ©S•çP÷i—‡ F£FR–ƒƒƒé©§žRÎê?}útêÛ·¯b´ÔAžM(gú^xá>|¸²_·_¿~0V0V †‚+`Ø SUªÆP©Rg!Œj\ŒpMÂʘÎ8©ËÍš5S²T¼Ìæ‚Í’z?­Ñ“=㢷O½ŸvÙ‘ìݯaÆŠÙæe®¿ã÷«îãϲgÏ% ÇâçÐ[æûÅÅÅ)'žåø *¹|M›6mhÑ¢EÊòÂ… éúë¯W–›4i¢d³xyÆ T¿~}++0ÜQ¦ä–5Tûr ‰ W¬4V<õcDÓb¤ WÄœ°‰jÞ¼y™ûhU»vm»çé0žBcSáççg׸825¶÷Sŵ\Zñýl·émWëÀ´Ël®X|_žÒã,/³‰âé=ÛÏÌŸEÔßyç% ÆË|û¯ý«Ä<Ù{ ŒŒÆXí&ŠOÊGîÑt ª±Rë_ŒfZïÿõ×_•ïçšk®¡+VÐúõëéÁTöñv–v™Ÿƒï£®³øùXüÙ$±Ô Ÿœ“›%ζ±)üÇ?þ¡LݽöÚkôøã—Ä —s=OÕ½üòËJKÏüp]D{;?¶}ûö4tèP—ccj¨±† 2Wg!ŒfZe[ª*­é¨Š´SWôÐC)uBª‘QÅ…òS§÷ÔíÚe›Î±þùÏÒ‹/¾¨Ô±úùçŸé¦›nRj’f̘¡<–M‹—ÕLIÈ™%®qâl$K­o²5+¶âí+W®¤nݺ)Ó‘|¯«ùé§Ÿ”)Î8qñ:¿Ž=ó3dÈÅdªŸY»Û¨N:eŽüsô++0UÆJ=:ÐH¦E›iñ„8{ãªÔ©0UÜVœíÑJÍü¨b£c+ÎiÅÓil€T©&HÏUVl`´r×ó~öÙgÊ~0*0Vc¥c¬Xœñ`áMÓ¢•Ö¼821ŽŒ uZK+­a©FO|õÅG²9ãLÕ}÷ݧÔI¡]`¬ÆÊޱRÅ™6#lP´{¦Åžy±ÍÂÀ¸@ŒÎ@0lUÖXAcÆ ‚ +€±‚ Æ Lk¬â6'b šh¬2ÎÁXCƒ+`Ø sd¬¶§` &ÎT;ê`¬ ’ÆjgZÅÄÄb° ¤ÄÝ90Và cÅJÜ•Á‚jˆâ·í¿ûK0Và)cÅÚ‘z‚6'ØM| ÈçC›â·ÓÖ=yNMŒ0 ¨±† 2WŒAŒÀXAc0VÁXŒA0VxÔXà ‚`¬+‚`¬À`Æ*³ð;ÑYfA9Ӯ̢åYYˆž5VA€}Pþd€Êb;ˆu¬cëXÇzMX ”ÿè#wiƒØIEND®B`‚libalog-0.4.1/doc/asciidoc.css000066400000000000000000000236411172144577100162010ustar00rootroot00000000000000body { font-family: Georgia,serif; } h1, h2, h3, h4, h5, h6, div.title, caption.title, thead, p.table.header, #toctitle, #author, #revnumber, #revdate, #revremark, #footer { font-family: Arial,Helvetica,sans-serif; } body { background-color: #f1f1f1; } table.main { width: 80%; margin: 1em 10% 1em 10%; background: none repeat scroll 0 0 #ffffff; -webkit-border-radius: 10px; -webkit-box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6); -moz-border-radius: 10px; -moz-box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6); border-radius: 10px; box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6); } td.header { background-color: #666262; padding: 1px 15px 1px; border-bottom: 5px solid #4183c4; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; } td.content { padding: 1px 15px 40px; } td.footer { background-color: #666262; border-top: 8px solid #4183c4; -webkit-border-bottom-right-radius: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -moz-border-radius-bottomleft: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; } a { outline: none; } a:link, a:visited { color: #4183c4; text-decoration: none; } a:hover { text-decoration: underline; } em { font-style: italic; color: gray; } strong { font-weight: bold; color: #083194; } h2, h3, h4, h5, h6 { color: #4183c4; margin-top: 1.2em; margin-bottom: 0.5em; line-height: 1.3; } h1 { color: white; } h2, h3 { border-bottom: 1px solid silver; } h2 { padding-top: 0.5em; } h3 { float: left; } h3 + * { clear: left; } h5 { font-size: 1.0em; } div.sectionbody { margin-left: 0; } hr { border: 1px solid silver; } p { margin-top: 0.5em; margin-bottom: 0.5em; } ul, ol, li > p { margin-top: 0; } ul > li { color: #aaa; } ul > li > * { color: black; } pre { padding: 0; margin: 0; } #author { color: #527bbd; font-weight: bold; font-size: 1.1em; } #email { } #revnumber, #revdate, #revremark { } #footer { font-size: x-small; margin-bottom: 4.0em; } #footer-text { color: #f1f1f1; float: right; padding-bottom: 0.5em; margin-right: 4px; } #footer-badges { float: right; padding-bottom: 0.5em; } #preamble { margin-top: 1.5em; margin-bottom: 1.5em; } div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { margin-top: 1.0em; margin-bottom: 1.5em; } div.admonitionblock { margin-top: 2.0em; margin-bottom: 2.0em; margin-right: 10%; color: #606060; } div.content { /* Block element content. */ padding: 0; } /* Block element titles. */ div.title, caption.title { color: #527bbd; font-weight: bold; text-align: left; margin-top: 1.0em; margin-bottom: 0.5em; } div.title + * { margin-top: 0; } td div.title:first-child { margin-top: 0.0em; } div.content div.title:first-child { margin-top: 0.0em; } div.content + div.title { margin-top: 0.0em; } div.sidebarblock > div.content { background: #ffffee; border: 1px solid #dddddd; border-left: 4px solid #f0f0f0; padding: 0.5em; } div.listingblock > div.content { border: 1px solid #dddddd; border-left: 5px solid #f0f0f0; background: #f8f8f8; padding: 0.5em; } div.quoteblock, div.verseblock { padding-left: 1.0em; margin-left: 1.0em; margin-right: 10%; border-left: 5px solid #f0f0f0; color: #888; } div.quoteblock > div.attribution { padding-top: 0.5em; text-align: right; } div.verseblock > pre.content { font-family: inherit; font-size: inherit; } div.verseblock > div.attribution { padding-top: 0.75em; text-align: left; } /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } div.admonitionblock .icon { vertical-align: top; font-size: 1.1em; font-weight: bold; text-decoration: underline; color: #527bbd; padding-right: 0.5em; } div.admonitionblock td.content { padding-left: 0.5em; border-left: 3px solid #dddddd; } div.exampleblock > div.content { border-left: 3px solid #dddddd; padding-left: 0.5em; } div.imageblock div.content { padding-left: 0; } span.image img { border-style: none; } a.image:visited { color: white; } dl { margin-top: 0.8em; margin-bottom: 0.8em; } dt { margin-top: 0.5em; margin-bottom: 0; font-style: normal; color: gray; } dd > *:first-child { margin-top: 0.1em; } ul, ol { list-style-position: outside; } ol.arabic { list-style-type: decimal; } ol.loweralpha { list-style-type: lower-alpha; } ol.upperalpha { list-style-type: upper-alpha; } ol.lowerroman { list-style-type: lower-roman; } ol.upperroman { list-style-type: upper-roman; } div.compact ul, div.compact ol, div.compact p, div.compact p, div.compact div, div.compact div { margin-top: 0.1em; margin-bottom: 0.1em; } tfoot { font-weight: bold; } td > div.verse { white-space: pre; } div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } div.hdlist tr { padding-bottom: 15px; } dt.hdlist1.strong, td.hdlist1.strong { font-weight: bold; } td.hdlist1 { vertical-align: top; font-style: normal; padding-right: 0.8em; color: gray; } td.hdlist2 { vertical-align: top; } div.hdlist.compact tr { margin: 0; padding-bottom: 0; } .comment { background: yellow; } .footnote, .footnoteref { font-size: 0.8em; } span.footnote, span.footnoteref { vertical-align: super; } #footnotes { margin: 20px 0 20px 0; padding: 7px 0 0 0; } #footnotes div.footnote { margin: 0 0 5px 0; } #footnotes hr { border: none; border-top: 1px solid silver; height: 1px; text-align: left; margin-left: 0; width: 20%; min-width: 100px; } div.colist td { padding-right: 0.5em; padding-bottom: 0.3em; vertical-align: top; } div.colist td img { margin-top: 0.3em; } @media print { #footer-badges { display: none; } } #toc { margin-bottom: 2.5em; } #toctitle { color: #527bbd; font-size: 1.1em; font-weight: bold; margin-top: 1.0em; margin-bottom: 0.1em; } div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } div.toclevel2 { margin-left: 2em; font-size: 0.9em; } div.toclevel3 { margin-left: 4em; font-size: 0.9em; } div.toclevel4 { margin-left: 6em; font-size: 0.9em; } span.aqua { color: aqua; } span.black { color: black; } span.blue { color: blue; } span.fuchsia { color: fuchsia; } span.gray { color: gray; } span.green { color: green; } span.lime { color: lime; } span.maroon { color: maroon; } span.navy { color: navy; } span.olive { color: olive; } span.purple { color: purple; } span.red { color: red; } span.silver { color: silver; } span.teal { color: teal; } span.white { color: white; } span.yellow { color: yellow; } span.aqua-background { background: aqua; } span.black-background { background: black; } span.blue-background { background: blue; } span.fuchsia-background { background: fuchsia; } span.gray-background { background: gray; } span.green-background { background: green; } span.lime-background { background: lime; } span.maroon-background { background: maroon; } span.navy-background { background: navy; } span.olive-background { background: olive; } span.purple-background { background: purple; } span.red-background { background: red; } span.silver-background { background: silver; } span.teal-background { background: teal; } span.white-background { background: white; } span.yellow-background { background: yellow; } span.big { font-size: 2em; } span.small { font-size: 0.6em; } span.underline { text-decoration: underline; } span.overline { text-decoration: overline; } span.line-through { text-decoration: line-through; } /* * xhtml11 specific * * */ tt { font-family: monospace; font-size: inherit; color: gray; } div.tableblock { margin-top: 1.0em; margin-bottom: 1.5em; } div.tableblock > table { border: 3px solid #527bbd; } thead, p.table.header { font-weight: bold; color: #527bbd; } p.table { margin-top: 0; } /* Because the table frame attribute is overriden by CSS in most browsers. */ div.tableblock > table[frame="void"] { border-style: none; } div.tableblock > table[frame="hsides"] { border-left-style: none; border-right-style: none; } div.tableblock > table[frame="vsides"] { border-top-style: none; border-bottom-style: none; } /* * html5 specific * * */ .monospaced { font-family: monospace; font-size: inherit; color: gray; } table.tableblock { margin-top: 1.0em; margin-bottom: 1.5em; } thead, p.tableblock.header { font-weight: bold; color: #527bbd; } p.tableblock { margin-top: 0; } table.tableblock { border-width: 3px; border-spacing: 0px; border-style: solid; border-color: #527bbd; border-collapse: collapse; } th.tableblock, td.tableblock { border-width: 1px; padding: 4px; border-style: solid; border-color: #527bbd; } table.tableblock.frame-topbot { border-left-style: hidden; border-right-style: hidden; } table.tableblock.frame-sides { border-top-style: hidden; border-bottom-style: hidden; } table.tableblock.frame-none { border-style: hidden; } th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } /* * manpage specific * * */ body.manpage h1 { padding-top: 0.5em; padding-bottom: 0.5em; border-top: 2px solid silver; border-bottom: 2px solid silver; } body.manpage h2 { border-style: none; } body.manpage div.sectionbody { margin-left: 3em; } @media print { body.manpage div#toc { display: none; } } libalog-0.4.1/doc/html/000077500000000000000000000000001172144577100146475ustar00rootroot00000000000000libalog-0.4.1/doc/html/api/000077500000000000000000000000001172144577100154205ustar00rootroot00000000000000libalog-0.4.1/doc/html/api/alog-active_logger.ads.html000066400000000000000000000756611172144577100226250ustar00rootroot00000000000000 Package: Active_Logger

Index

Package: Active_Logger

Description

package Alog.Active_Logger is
Active Logger instance. This logger is an active object and implements concurrent, asynchronous logging. It provides the same functionality as the 'simple' logger.

Classes

Instance

type Instance (Init : Boolean) is tagged limited private;

Primitive operations:

Attach_Default_Facility
Attach_Facility
Attach_Transform
Detach_Default_Facility
Detach_Facility
Detach_Transform
Facility_Count
Get_Queue_Length
Is_Terminated
Set_Except_Handler
Transform_Count
Active logger instance. Incoming messages (via Log_Message) are put into a request queue. This queue is consumed by a logging task. By default exceptions which occur during asynchronous processing are printed to standard error. Use the Set_Except_Handler procedure to register a custom exception handler.

Types

Handle

type Handle is access all Instance;
Handle to active logger type.

Shutdown_Helper

type Shutdown_Helper (Logger : not null access Instance) is private;
This helper will call Shutdown on the logger given as discriminant when it goes out of scope. This relieves the user from having to excplicitly call shutdown on an instance of Alog active logger when wanting to terminate. Users must make sure to declare any shutdown helper in a smaller scope than the active logger on which the helper supposed to work.

Subprograms & Entries

Attach_Facility

procedure Attach_Facility 
(Logger: in out Instance;
Facility: Facilities.Handle);
Attach a facility to logger instance.

Attach_Default_Facility

procedure Attach_Default_Facility 
(Logger: in out Instance);
Attach default facility with name Default_Facility_Name to logger instance. If the default facility is already attached do nothing.

Detach_Facility

procedure Detach_Facility 
(Logger: in out Instance;
Name: String);
Detach a facility with name 'Name' from logger instance. If the facility is not found a Facility_Not_Found exception is raised.

Detach_Default_Facility

procedure Detach_Default_Facility 
(Logger: in out Instance);
Detach default facility with name Default_Facility_Name from logger instance. If the default facility is not attached do nothing.

Facility_Count

function Facility_Count 
(Logger: Instance) return Natural;
Return number of attached facilites.

Update

procedure Update 
(Logger: in out Instance;
Name: String;
Process: Tasked_Logger.Facility_Update_Handle);
Update a specific Facility identified by 'Name'. Call the 'Process' procedure to perform the update operation.

Iterate

procedure Iterate 
(Logger: in out Instance;
Process: Tasked_Logger.Facility_Update_Handle);
Call 'Process' for all attached facilities.

Attach_Transform

procedure Attach_Transform 
(Logger: in out Instance;
Transform: Transforms.Handle);
Attach a transform to logger instance.

Detach_Transform

procedure Detach_Transform 
(Logger: in out Instance;
Name: String);
Detach a transform with name 'Name' from logger instance. If the transform is not found a Transform_Not_Found exception is raised.

Transform_Count

function Transform_Count 
(Logger: Instance) return Natural;
Return number of attached transforms.

Clear

procedure Clear 
(Logger: in out Instance);
Clear logger instance. Detach and teardown all attached facilities and transforms.

Log_Message

procedure Log_Message 
(Logger: in out Instance;
Source: String := "";
Level: Log_Level;
Msg: String);
Log the given message asynchronously. The message is put into a log request queue which is continuously consumed by a logging task. This procedure is *safe* to call from protected actions (e.g. from an entry call statement or rendezvous).

Get_Queue_Length

function Get_Queue_Length 
(Logger: Instance) return Natural;
Returns the number of currently queued log messages.

Shutdown

procedure Shutdown 
(Logger: in out Instance;
Flush: Boolean := True);
Shutdown the active logger. This procedure must be called in order for the logger task to be terminated properly. If 'Flush' is set to True the procedure will wait for all queued messages to be logged.

Is_Terminated

function Is_Terminated 
(Logger: Instance) return Boolean;
Returns True if active logger shutdown sequence is complete.

All_Done

procedure All_Done 
(Logger: in out Instance);
This procedure blocks until all queued logging requests have been consumed.

Set_Except_Handler

procedure Set_Except_Handler 
(Logger: Instance;
Proc: Exceptions.Exception_Handler);
Set custom exception handler procedure.
libalog-0.4.1/doc/html/api/alog-controlled_map.ads.html000066400000000000000000000516551172144577100230120ustar00rootroot00000000000000 Package: Controlled_Map (generic)

Index

Package: Controlled_Map (generic)

Description

generic
   type Key_Type (<>) is private;
   type Element_Type (<>) is limited private;
   type Element_Handle is access Element_Type;

   with function "<" (Left, Right : Key_Type) return Boolean is <>;

--  Controlled variant of a map. The memory of an element pointed to by a
--  previously inserted handle is freed upon calling Delete, Clear or during
--  finalization of the controlled map. Thus control over objects inserted into
--  this map resides with the controlled map.
package Alog.Controlled_Map is
Copyright (c) 2009, Reto Buerki, Adrian-Ken Rueegsegger This file is part of Alog. Alog is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Alog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Alog; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Classes

Map

type Map is new Ada.Finalization.Limited_Controlled with private;

Ancestors:

Limited_Controlled

Primitive operations:

Adjust
Finalize
Initialize
A controlled map container.

Types

Key_Type

type Key_Type (<>) is private;

Element_Type

type Element_Type (<>) is limited private;

Element_Handle

type Element_Handle is access Element_Type;

Subprograms & Entries

<

function "<" 
(Left, Right: Key_Type) return Boolean is <>;

Insert

procedure Insert 
(Container: in out Map;
Key: Key_Type;
New_Item: Element_Handle);
Insert a new element handle with 'Key' into the controlled map.

Element

function Element 
(Container: Map;
Key: Key_Type) return Element_Handle;
Return a handle to an element identified by 'Key'.

Delete

procedure Delete 
(Container: in out Map;
Key: Key_Type);
Delete the element with key 'Key' from the map. Memory of the element is freed.

Contains

function Contains 
(Container: Map;
Key: Key_Type) return Boolean;
Returns True if an element with key 'Key' is in the map.

Is_Empty

function Is_Empty 
(Container: Map) return Boolean;
Returns True if the map is empty.

Clear

procedure Clear 
(Container: in out Map);
Remove all elements in the map. Memory of the elements is freed.

Length

function Length 
(Container: Map) return Natural;
Return the current element count.

Iterate

procedure Iterate 
(Container: Map;
Process: not null access procedure (Handle : Element_Handle));
Iterate over all elements in the map and call the 'Process' procedure for each handle.
libalog-0.4.1/doc/html/api/alog-exceptions.ads.html000066400000000000000000000064221172144577100221610ustar00rootroot00000000000000 Package: Exceptions

Index

Package: Exceptions

Description

package Alog.Exceptions is
Alog exception package. Contains type definitions for Alog specific exception handling.

Types

Exception_Handler

type Exception_Handler is not null access procedure
     (Except : Ada.Exceptions.Exception_Occurrence;
      Caller : Ada.Task_Identification.Task_Id);
Exception handler callback procedure. Used to register custom callback procedures in active and tasked loggers.
libalog-0.4.1/doc/html/api/alog-facilities-file_descriptor.ads.html000066400000000000000000000313541172144577100252710ustar00rootroot00000000000000 Package: File_Descriptor

Index

Package: File_Descriptor

Description

package Alog.Facilities.File_Descriptor is
File_Descriptor facility. Used to log to a console or file. If no file is specified by a Set_Logfile()-call, console logging is used.

Classes

Instance

type Instance is new Alog.Facilities.Instance with private;

Primitive operations:

Alog.Facilities.Setup (Inherited)
Close_Logfile
Write (overriding Alog.Facilities.Write)
File Descriptor based logging facility.

Types

Handle

type Handle is access all Instance;

Constants & Global variables

Open_File_Error

Open_File_Error : exception;
This exception is raised if an error occurs while trying to open a logfile.

Subprograms & Entries

Teardown

procedure Teardown 
(Facility: in out Instance);
Implementation of Teardown-procedure.

Set_Logfile

procedure Set_Logfile 
(Facility: in out Instance;
Path: String;
Append: Boolean := True);
Set logfile to use. If not set, standard output is used for logging. Set Append to False if an existing logfile should be overwritten.

Get_Logfile

function Get_Logfile 
(Facility: Instance) return Ada.Text_IO.File_Access;
Get currently used logfile.

Close_Logfile

procedure Close_Logfile 
(Facility: in out Instance;
Remove: Boolean := False);
Close opened logfile.
libalog-0.4.1/doc/html/api/alog-facilities-pgsql.ads.html000066400000000000000000001105621172144577100232410ustar00rootroot00000000000000 Package: Pgsql

Index

Package: Pgsql

Description

package Alog.Facilities.Pgsql is
PGSQL facility. Used to log to a Postgresql database.

Classes

Instance

type Instance is new Alog.Facilities.Instance with private;

Primitive operations:

Close_Connection
Get_Credentials
Get_Host_Name
Get_Host_Port
Get_Level_Column_Name
Get_Message_Column_Name
Get_Table_Name
Get_Timestamp_Column_Name
Is_SQL_Trace
Set_Credentials
Set_Host_Address
Set_Host_Name
Set_Host_Port
Set_Level_Column_Name
Set_Message_Column_Name
Set_SQL_Trace
Set_Table_Name
Set_Timestamp_Column_Name
Toggle_SQL_Trace
Write (overriding Alog.Facilities.Write)
PGSQL logging facility.

Types

Handle

type Handle is access all Instance;

Subprograms & Entries

Setup

procedure Setup 
(Facility: in out Instance);
Implementation of Setup-procedure.

Teardown

procedure Teardown 
(Facility: in out Instance);
Implementation of Teardown-procedure.

Set_Host_Name

procedure Set_Host_Name 
(Facility: in out Instance;
Hostname: String);
Set hostname of database server.

Get_Host_Name

function Get_Host_Name 
(Facility: Instance) return String;
Get hostname of database server.

Set_Host_Address

procedure Set_Host_Address 
(Facility: in out Instance;
Address: String);
Set ip address of database server.

Set_Host_Port

procedure Set_Host_Port 
(Facility: in out Instance;
Port: Natural);
Set port of database server.

Get_Host_Port

function Get_Host_Port 
(Facility: Instance) return Natural;
Get port of database server.

Set_SQL_Trace

procedure Set_SQL_Trace 
(Facility: in out Instance;
Filename: String;
Mode: APQ.Trace_Mode_Type);
Set SQL trace parameters.

Toggle_SQL_Trace

procedure Toggle_SQL_Trace 
(Facility: in out Instance;
State: Boolean);
Toggles tracing of SQL statements.

Is_SQL_Trace

function Is_SQL_Trace 
(Facility: Instance) return Boolean;
Tells whether sql tracing is enabled.

Set_DB_Name

procedure Set_DB_Name 
(Facility: in out Instance;
DB_Name: String);
Set name of database.

Get_DB_Name

function Get_DB_Name 
(Facility: Instance) return String;
Get name of database.

Set_Table_Name

procedure Set_Table_Name 
(Facility: in out Instance;
Table_Name: String);
Set name of database table.

Get_Table_Name

function Get_Table_Name 
(Facility: Instance) return String;
Get name of database table.

Set_Level_Column_Name

procedure Set_Level_Column_Name 
(Facility: in out Instance;
Column_Name: String);
Set name of log level column.

Get_Level_Column_Name

function Get_Level_Column_Name 
(Facility: Instance) return String;
Get name of log level column.

Set_Timestamp_Column_Name

procedure Set_Timestamp_Column_Name 
(Facility: in out Instance;
Column_Name: String);
Set name of log level column.

Get_Timestamp_Column_Name

function Get_Timestamp_Column_Name 
(Facility: Instance) return String;
Get name of timestamp column.

Set_Message_Column_Name

procedure Set_Message_Column_Name 
(Facility: in out Instance;
Column_Name: String);
Set name of log message column.

Get_Message_Column_Name

function Get_Message_Column_Name 
(Facility: Instance) return String;
Get name of log message column.

Set_Credentials

procedure Set_Credentials 
(Facility: in out Instance;
Username: String;
Password: String);
Set credentials for the database connection.

Get_Credentials

function Get_Credentials 
(Facility: Instance) return String;
Get credentials of database connection. Only the username is returned.

Close_Connection

procedure Close_Connection 
(Facility: in out Instance);
Close open database connection.
libalog-0.4.1/doc/html/api/alog-facilities-smtp.ads.html000066400000000000000000000325021172144577100230730ustar00rootroot00000000000000 Package: SMTP

Index

Package: SMTP

Description

package Alog.Facilities.SMTP is
SMTP-Logging facility. Used to send log-messages to a configurable mailserver. AWS must be installed for this facility to work.

Classes

Instance

type Instance is new Alog.Facilities.Instance with private;

Primitive operations:

Alog.Facilities.Setup (Inherited)
Alog.Facilities.Teardown (Inherited)
Format_Message
Set_Recipient
Write (overriding Alog.Facilities.Write)
SMTP based logging facility.

Types

Handle

type Handle is access all Instance;

Constants & Global variables

No_Recipient

No_Recipient    : exception;
No recipient specified. Cannot send mail.

No_Server

No_Server       : exception;
No server specified. Cannot send mail.

Delivery_Failed

Delivery_Failed : exception;
Mail could not be delivered.

Subprograms & Entries

Set_Recipient

procedure Set_Recipient 
(Facility: in out Instance;
Name: String;
EMail: String);
Set recipient for log-messages. This procedure MUST be called before subsequent calls to Write_Message().

Set_Server

procedure Set_Server 
(Facility: in out Instance;
Name: String);
Set server for log-messages. This procedure MUST be called before subsequent calls to Write_Message().

Set_Header

procedure Set_Header 
(Facility: in out Instance;
Header: String);
Set Message-Header of log-messages.

Get_Header

function Get_Header 
(Facility: Instance) return String;
Get actual Message-Header of log-messages.
libalog-0.4.1/doc/html/api/alog-facilities-syslog.ads.html000066400000000000000000000231041172144577100234260ustar00rootroot00000000000000 Package: Syslog

Index

Package: Syslog

Description

package Alog.Facilities.Syslog is
Syslog facility: Used to log to systems syslog.

Classes

Instance

type Instance is new Alog.Facilities.Instance with private;

Primitive operations:

Alog.Facilities.Setup (Inherited)
Alog.Facilities.Teardown (Inherited)
Write (overriding Alog.Facilities.Write)
Syslog based logging facility.

Types

Handle

type Handle is access all Instance;

Syslog_Origin

type Syslog_Origin is
     (LOG_AUTH,
      LOG_AUTHPRIV,
      LOG_CRON,
      LOG_DAEMON,
      LOG_FTP,
      LOG_KERN,
      LOG_LOCAL0,
      LOG_LOCAL1,
      LOG_LOCAL2,
      LOG_LOCAL3,
      LOG_LOCAL4,
      LOG_LOCAL5,
      LOG_LOCAL6,
      LOG_LOCAL7,
      LOG_LPR,
      LOG_MAIL,
      LOG_NEWS,
      LOG_SYSLOG,
      LOG_USER,
      LOG_UUCP);
Syslog facilties. Specifies what type of program is logging the message.

Subprograms & Entries

Set_Origin

procedure Set_Origin 
(Facility: in out Instance;
Value: Syslog_Origin);
Set origin of syslog message.

Get_Origin

function Get_Origin 
(Facility: Instance) return Syslog_Origin;
Return currently set syslog origin of given facility.
libalog-0.4.1/doc/html/api/alog-facilities-xmpp.ads.html000066400000000000000000000330271172144577100230770ustar00rootroot00000000000000 Package: XMPP

Index

Package: XMPP

Description

package Alog.Facilities.XMPP is
XMPP-Logging (jabber) facility. Send log-messages to a configured Jabber ID via a given jabber server. AWS must be installed for this facility to work.

Classes

Instance

type Instance is new Alog.Facilities.Instance with private;

Primitive operations:

Alog.Facilities.Setup (Inherited)
Alog.Facilities.Teardown (Inherited)
Set_Recipient
Write (overriding Alog.Facilities.Write)
XMPP based logging facility.

Types

Handle

type Handle is access all Instance;

Constants & Global variables

No_Sender

No_Sender             : exception;
No sender ID specified. Cannot send message.

No_Recipient

No_Recipient          : exception;
No recipient specified. Cannot send message.

No_Server

No_Server             : exception;
No server specified. Cannot send message.

Recipient_Not_Present

Recipient_Not_Present : exception;
Recipient can not be reached through specified server.

Delivery_Failed

Delivery_Failed       : exception;
Message could not be delivered.

Subprograms & Entries

Set_Sender

procedure Set_Sender 
(Facility: in out Instance;
JID: String;
Password: String);
Set sender for log messages. This procedure MUST be called before subsequent calls to Write_Message().

Set_Recipient

procedure Set_Recipient 
(Facility: in out Instance;
JID: String);
Set recipient for log-messages. This procedure MUST be called before subsequent calls to Write_Message().

Set_Server

procedure Set_Server 
(Facility: in out Instance;
Name: String);
Set server for log-messages. This procedure MUST be called before subsequent calls to Write_Message().
libalog-0.4.1/doc/html/api/alog-facilities.ads.html000066400000000000000000000627551172144577100221270ustar00rootroot00000000000000 Package: Facilities

Index

Package: Facilities

Description

package Alog.Facilities is
Alog facilities package. Provides common data and methods used by all facilities.

Packages

BS_Path (new Generic_Bounded_Length)

package BS_Path is new Generic_Bounded_Length (Max_Path_Length);

Classes

Instance (abstract)

type Instance is abstract tagged limited private;
Abstract type facility instance. All facilities in the Alog framework must implement this type.

Types

Class

subtype Class is Instance'Class;

Handle

type Handle is access all Class;

Subprograms & Entries

=

function "=" 
(Left: Handle;
Right: Handle) return Boolean;
Equal function.

Set_Name

procedure Set_Name 
(Facility: in out Class;
Name: String);
Set facility name.

Get_Name

function Get_Name 
(Facility: Class) return String;
Get facility name.

Get_Timestamp

function Get_Timestamp 
(Facility: Class;
Time: Ada.Calendar.Time := Ada.Calendar.Clock) return String;
Creates a timestamp and returns it as String. If no Time is given, the current time is used.

Process

procedure Process 
(Facility: Class;
Request: Log_Request.Instance);
Process a log request.

Write (abstract)

procedure Write 
(Facility: Instance;
Level: Log_Level := Info;
Msg: String) is abstract;
Write message with specified log level. This procedure must be implemented by all facilities.

Toggle_Write_Timestamp

procedure Toggle_Write_Timestamp 
(Facility: in out Class;
State: Boolean);
Enable/disable whether a timestamp is written for log messages.

Toggle_UTC_Timestamp

procedure Toggle_UTC_Timestamp 
(Facility: in out Class;
State: Boolean);
Enable/disable UTC timestamps for log messages.

Is_Write_Timestamp

function Is_Write_Timestamp 
(Facility: Class) return Boolean;
Returns the current value of Write_Timestamp.

Is_UTC_Timestamp

function Is_UTC_Timestamp 
(Facility: Class) return Boolean;
Returns True if the timestamp of the facility is written in UTC time.

Toggle_Write_Loglevel

procedure Toggle_Write_Loglevel 
(Facility: in out Class;
State: Boolean);
Enable/disable whether the loglevel is written for log messages.

Is_Write_Loglevel

function Is_Write_Loglevel 
(Facility: Class) return Boolean;
Returns the current value of Write_Loglevel.

Toggle_Write_Source

procedure Toggle_Write_Source 
(Facility: in out Class;
State: Boolean);
Enable/disable whether the source of the message is logged.

Is_Write_Source

function Is_Write_Source 
(Facility: Class) return Boolean;
Returns True if writing of log message sources is enabled.

Setup

procedure Setup 
(Facility: in out Instance) is null;
Each facility must provide a Setup-procedure. These procedures are called by Logger instances when attaching Facilities. All needed operations prior to writing log messages should be done here.

Teardown

procedure Teardown 
(Facility: in out Instance) is null;
Each facility must provide a Teardown-procedure. These procedures are called by Logger instances when detaching Facilities or when the logger object gets out of scope.
libalog-0.4.1/doc/html/api/alog-helpers.ads.html000066400000000000000000000133101172144577100214340ustar00rootroot00000000000000 Package: Helpers

Index

Package: Helpers

Description

package Alog.Helpers is
Alog helper functions/procedures.

Constants & Global variables

Invalid_Config

Invalid_Config : exception;
Exception is raised if a loglevel config file is invalid.

Subprograms & Entries

Assert_Files_Equal

function Assert_Files_Equal 
(Filename1: String;
Filename2: String) return Boolean;
Compare two files byte-wise. Returns True if both files are equal. The two files are closed but not removed after comparison.

Read_Loglevels

procedure Read_Loglevels 
(Filename: String;
Default_Level: in out Log_Level;
Identifiers: out Maps.Wildcard_Level_Map);
Read default loglevels and (optional) identifier based loglevels from file given by filename. The format is as follows: # This is a comment (ignored) # Default loglevel Default = Info # Identifier-specific loglevels Foo.* = Debug Foo.Bar = Info If no default loglevel setting is found in the file, the loglevel passed as Default_Level parameter is returned unchanged.
libalog-0.4.1/doc/html/api/alog-log_request.ads.html000066400000000000000000000237411172144577100223340ustar00rootroot00000000000000 Package: Log_Request

Index

Package: Log_Request

Description

package Alog.Log_Request is
Log request type. Log request objects are used for asynchronous logging and hold all relevant information of a log request.

Classes

Instance

type Instance is tagged private;

Primitive operations:

Get_Caller_ID
Get_Log_Level
A log request contains all related information to log asynchronously (Caller identification, loglevel and message).

Subprograms & Entries

Create

function Create 
(ID: Task_Id := Current_Task;
Source: String := "";
Level: Log_Level := Debug;
Message: String) return Instance;
Create a log request object from the specified parameters.

Get_Caller_ID

function Get_Caller_ID 
(Request: Instance) return Task_Id;
Return the caller ID of the request object.

Get_Source

function Get_Source 
(Request: Instance) return String;
Return the source of the request object.

Get_Log_Level

function Get_Log_Level 
(Request: Instance) return Log_Level;
Return the loglevel of the request object.

Get_Message

function Get_Message 
(Request: Instance) return String;
Return the log message of the request object.
libalog-0.4.1/doc/html/api/alog-logger.ads.html000066400000000000000000000756171172144577100212730ustar00rootroot00000000000000 Package: Logger

Index

Package: Logger

Description

package Alog.Logger is
Logger instance. Facilities can be attached to a logger instance in order to log to different targets simultaneously. A logger provides different helper functions for logging facilities configuration.

Classes

Instance

type Instance (Init : Boolean) is tagged limited private;

Primitive operations:

Attach_Default_Facility
Attach_Facility
Attach_Transform
Detach_Default_Facility
Detach_Facility
Detach_Transform
Facility_Count
Finalize
Initialize (overriding Initialize)
Transform_Count
Logger instance. The Init discriminant defines whether or not a default 'stdout' (FD facility without logfile set) is attached automatically. - Set Init to 'True' if you want to make sure minimal stdout logging is possible as soon as a new logger is instantiated.

Types

Handle

type Handle is access all Instance;
Handle to logger type.

Constants & Global variables

Facility_Not_Found

Facility_Not_Found        : exception;
Will be raised if a requested facility is not found.

Facility_Already_Present

Facility_Already_Present  : exception;
Will be raised if a requested facility is not found.

Transform_Not_Found

Transform_Not_Found       : exception;
Will be raised if a facility is already present.

Transform_Already_Present

Transform_Already_Present : exception;
Will be raised if a requested transform is not found.

Default_Facility_Name (String)

Default_Facility_Name : constant String := "__Default_Facility";

Subprograms & Entries

Attach_Facility

procedure Attach_Facility 
(Logger: in out Instance;
Facility: Facilities.Handle);
Attach a facility to logger instance.

Attach_Default_Facility

procedure Attach_Default_Facility 
(Logger: in out Instance);
Attach default facility with name Default_Facility_Name to logger instance. If the default facility is already attached do nothing.

Detach_Facility

procedure Detach_Facility 
(Logger: in out Instance;
Name: String);
Detach a facility with name 'Name' from logger instance. If the facility is not found a Facility_Not_Found exception is raised.

Detach_Default_Facility

procedure Detach_Default_Facility 
(Logger: in out Instance);
Detach default facility with name Default_Facility_Name from logger instance. If the default facility is not attached do nothing.

Facility_Count

function Facility_Count 
(Logger: Instance) return Natural;
Return number of attached facilites.

Update

procedure Update 
(Logger: Instance;
Name: String;
Process: not null access procedure (Facility_Handle : Facilities.Handle));
Update a specific Facility identified by 'Name'. Call the 'Process' procedure to perform the update operation.

Iterate

procedure Iterate 
(Logger: Instance;
Process: not null access procedure (Facility_Handle : Facilities.Handle));
Call 'Process' for all attached facilities.

Attach_Transform

procedure Attach_Transform 
(Logger: in out Instance;
Transform: Transforms.Handle);
Attach a transform to logger instance.

Detach_Transform

procedure Detach_Transform 
(Logger: in out Instance;
Name: String);
Detach a transform with name 'Name' from logger instance. If the transform is not found a Transform_Not_Found exception is raised.

Transform_Count

function Transform_Count 
(Logger: Instance) return Natural;
Return number of attached transforms.

Update

procedure Update 
(Logger: Instance;
Name: String;
Process: not null access procedure (Transform_Handle : Transforms.Handle));
Update a specific Transform identified by 'Name'. Call the 'Process' procedure to perform the update operation.

Iterate

procedure Iterate 
(Logger: Instance;
Process: not null access procedure (Transform_Handle : Transforms.Handle));
Call 'Process' for all attached transforms.

Clear

procedure Clear 
(L: in out Instance);
Clear logger instance. Detach and teardown all attached facilities and transforms.

Log_Message

procedure Log_Message 
(Logger: Instance;
Source: String := "";
Level: Log_Level;
Msg: String);
Log a message. The Write_Message() procedure of all attached facilities is called. Depending on the Log-Threshold set, the message is logged to different targets (depending on the facilites) automatically. Prior to actually processing the given log message the policy database is inquired if the log message with given source and level should be logged.

Free

procedure Free is new Ada.Unchecked_Deallocation 
(Object => Facilities.Class, Name => Facilities.Handle);
Free memory allocated by a facility.

Free

procedure Free is new Ada.Unchecked_Deallocation 
(Object => Transforms.Class, Name => Transforms.Handle);
Free memory allocated by a transform.
libalog-0.4.1/doc/html/api/alog-maps.ads.html000066400000000000000000000357121172144577100207440ustar00rootroot00000000000000 Package: Maps

Index

Package: Maps

Description

package Alog.Maps is
Alog maps package. Provides map data types.

Classes

Wildcard_Level_Map

type Wildcard_Level_Map is tagged private;
A map of loglevels with string as key type.

Types

Cursor

type Cursor is private;
Index for a map element.

Constants & Global variables

Wildcard (Character)

Wildcard   : constant Character := '*';
Character used as wildcard indicator in lookups.

Subprograms & Entries

Element

function Element 
(Map: Wildcard_Level_Map;
Key: String) return Log_Level;
Returns the loglevel element for given key.

Element

function Element 
(Position: Cursor) return Log_Level;
Returns the loglevel element at given position.

Find

function Find 
(Map: Wildcard_Level_Map;
Key: String) return Cursor;
Returns the position for an element with specified key. If no element is found No_Element is returned.

Lookup

function Lookup 
(Map: Wildcard_Level_Map;
Key: String) return Cursor;
Returns the position of the element with the closest match to given key. This function considers wildcards when searching for an element. Example: Key | Element ------------------- Foo.* | Debug Foo.Bar | Alert A lookup for "Foo.Foo" has no exact match. The next closest match is "Foo.*" which will return the Debug element. Looking for "Foo" will return Debug since it matches the wildcard "Foo.*". If no exact and wildcard match is found No_Element is returned.

Insert

procedure Insert 
(Map: in out Wildcard_Level_Map;
Key: String;
Item: Log_Level);
Insert given key/item pair into map. If given key is already present the associated item is replaced.

Clear

procedure Clear 
(Map: in out Wildcard_Level_Map);
Clears the wildcard map.

Length

function Length 
(Map: Wildcard_Level_Map) return Natural;
Return the number of elements in the map.
libalog-0.4.1/doc/html/api/alog-policy_db.ads.html000066400000000000000000000321141172144577100217410ustar00rootroot00000000000000 Package: Policy_DB

Index

Package: Policy_DB

Description

package Alog.Policy_DB is
Logging policy database package. This DB stores logging policies. Policies in the database are used inside the framework for logging decisions.

Constants & Global variables

Alog_Default_Level (Alog.Log_Level)

Alog_Default_Level : constant Log_Level := Info;
Framework default loglevel.

No_Ident_Loglevel

No_Ident_Loglevel : exception;
Will be raised if loglevel is not found for a requested identifier.

Subprograms & Entries

Set_Default_Loglevel

procedure Set_Default_Loglevel 
(Level: Log_Level);
Set given loglevel as default loglevel.

Get_Default_Loglevel

function Get_Default_Loglevel return Log_Level;
Return current default loglevel.

Set_Loglevel

procedure Set_Loglevel 
(Identifier: String;
Level: Log_Level);
Set given loglevel for specified identifier string. If the identifier is already present the loglevel is updated. Identifier strings are case-sensitive. Use wildcards to specify a loglevel for a range of identifiers. Identifier hierarchies are separated by dots, the wildcard is '*'. The following example sets a Debug loglevel for all log-identifiers in Foo.Bar (including Foo.Bar). Example: Foo.Bar.* = Debug Direct matches take precedence over wildcard matches. In the following example the loglevel for identifier 'Foo.Bar' is explicitly set to Info. Example: Foo.Bar = Info Foo.Bar.* = Debug

Set_Loglevel

procedure Set_Loglevel 
(Identifiers: Maps.Wildcard_Level_Map);
Apply loglevels for identifiers stored in map.

Get_Loglevel

function Get_Loglevel 
(Identifier: String) return Log_Level;
Return loglevel for given identifier string. Raises No_Ident_Loglevel exception if no entry for given identifier is found (exact match only, no wildcard lookup).

Lookup

function Lookup 
(Identifier: String) return Log_Level;
Return loglevel for given identifier string. Returns the closest match, if no associated loglevel is found the default loglevel is returned.

Reset

procedure Reset;
Reset the logging policy database to the initial state.

Accept_Src

function Accept_Src 
(Identifier: String := "";
Level: Log_Level) return Boolean;
Returns True if the given loglevel is accepted for a source identifier. If no identifier is given, the loglevel is verified against the default loglevel.

Accept_Dst

function Accept_Dst 
(Identifier: String;
Level: Log_Level) return Boolean;
Returns True if the given loglevel is accepted for a destination identifier. If no match for the given identifier is found True is returned.
libalog-0.4.1/doc/html/api/alog-protected_containers.ads.html000066400000000000000000000303701172144577100242150ustar00rootroot00000000000000 Package: Protected_Containers

Index

Package: Protected_Containers

Description

package Alog.Protected_Containers is
Alog Protected Containers. This package provides protected containers which are safe for concurrent access.

Tasks & Protected

Log_Request_List (protected type)

Protected variant of a log request list. This list holds log request objects and is safe for concurrent access. It operates in FIFO-Mode.

Types

Log_Request_Storage

type Log_Request_Storage is private;

Subprograms & Entries

Log_Request_List. Put

procedure Put 
(Element: Log_Request.Instance);
Put an element at the end of the request list.

Log_Request_List. Get (abstract)

entry Get 
(Element: out Log_Request.Instance);
Get the first element from the list (and delete it).

Log_Request_List. Done

procedure Done;
Signal successfull processing of request previously gotten from list.

Log_Request_List. All_Done (abstract)

entry All_Done;
This procedure blocks until the list is empty and there are no pending requests. A requests is pending when it is taken off the list via Get but it's successfull processing has not been signaled back via the procedure Done.

Log_Request_List. Clear

procedure Clear;
Clear the request list by deleting all log requests.

Log_Request_List. Length

function Length return Natural;
Return the number of elements in the list.

Log_Request_List. Pending

function Pending return Natural;
Return the number of pending requests.
libalog-0.4.1/doc/html/api/alog-tasked_logger.ads.html000066400000000000000000000570041172144577100226140ustar00rootroot00000000000000 Package: Tasked_Logger

Index

Package: Tasked_Logger

Description

package Alog.Tasked_Logger is
Tasked Logger instance. Facilities can be attached to this logger instance in order to log to different targets simultaneously. This instance provides task-safe concurrent logging.

Tasks & Protected

Instance (task type)

Tasked logger instance. The Init discriminant defines whether or not a default 'stdout' (FD facility without logfile set) is attached automatically. Default is 'False'. Set Init to 'True' if you want to make sure minimal stdout logging is possible as soon as a new logger is instantiated. By default exceptions which occur during asynchronous processing are printed to standard error. Use the Set_Except_Handler entry to register a custom exception handler.

Types

Facility_Update_Handle

type Facility_Update_Handle is not null access
     procedure (Facility_Handle : Facilities.Handle);
Handle to facility update procedure.

Handle

type Handle is access all Instance;
Handle to tasked logger type.

Subprograms & Entries

Instance. Init

Init: Boolean := False)

Instance. Attach_Facility (abstract)

entry Attach_Facility 
(Facility: Facilities.Handle);
Attach a facility to tasked logger instance.

Instance. Attach_Default_Facility (abstract)

entry Attach_Default_Facility;
Attach default facility to tasked logger instance.

Instance. Detach_Facility (abstract)

entry Detach_Facility 
(Name: String);
Detach a facility from tasked logger instance.

Instance. Detach_Default_Facility (abstract)

entry Detach_Default_Facility;
Detach default facility from tasked logger instance.

Instance. Facility_Count (abstract)

entry Facility_Count 
(Count: out Natural);
Return number of attached facilites.

Instance. Update (abstract)

entry Update 
(Name: String;
Process: Facility_Update_Handle);
Update a specific facility identified by 'Name'. Calls the 'Process' procedure to perform the update operation.

Instance. Iterate (abstract)

entry Iterate 
(Process: Facility_Update_Handle);
Call 'Process' for all attached facilities.

Instance. Attach_Transform (abstract)

entry Attach_Transform 
(Transform: Transforms.Handle);
Attach a transform to tasked logger instance.

Instance. Detach_Transform (abstract)

entry Detach_Transform 
(Name: String);
Detach a transform from tasked logger instance.

Instance. Transform_Count (abstract)

entry Transform_Count 
(Count: out Natural);
Return number of attached transforms.

Instance. Log_Message (abstract)

entry Log_Message 
(Source: String := "";
Level: Log_Level;
Msg: String;
Caller: Ada.Task_Identification.Task_Id := Ada.Task_Identification.Null_Task_Id);
Log a message. The Write_Message() procedure of all attached facilities is called. Depending on the Log-Threshold set, the message is logged to different targets (depending on the facilites) automatically. If an exception occurs, the exception handler procedure is called. If caller is not specified the executing task's ID is used instead. Since Log_Message'Caller can not be used as default parameter the entry checks if the variable is set to 'Null_Task_Id' in the body.

Instance. Clear (abstract)

entry Clear;
Clear tasked logger instance. Detach and teardown all attached facilities and transforms and clear any stored exceptions.

Instance. Shutdown (abstract)

entry Shutdown;
Explicitly shutdown tasked logger.

Instance. Set_Except_Handler (abstract)

entry Set_Except_Handler 
(Proc: Exceptions.Exception_Handler);
Set custom exception handler procedure.
libalog-0.4.1/doc/html/api/alog-transforms-casing.ads.html000066400000000000000000000225521172144577100234420ustar00rootroot00000000000000 Package: Casing

Index

Package: Casing

Description

package Alog.Transforms.Casing is
Casing transform. Used to transform casing (lower/uppercase) of messages

Classes

Instance

type Instance is new Alog.Transforms.Instance with private;

Primitive operations:

Alog.Transforms.Setup (Inherited)
Alog.Transforms.Teardown (Inherited)
Casing transform.

Types

Operation_Mode

type Operation_Mode is (Uppercase, Lowercase);

Handle

type Handle is access all Instance;

Subprograms & Entries

Transform_Message

function Transform_Message 
(Transform: Instance;
Level: Log_Level := Info;
Msg: String) return String;
Implementation of Transform_Message.

Set_Mode

procedure Set_Mode 
(Transform: in out Instance;
Mode: Operation_Mode);
Set operation mode of transform.
libalog-0.4.1/doc/html/api/alog-transforms.ads.html000066400000000000000000000324151172144577100221770ustar00rootroot00000000000000 Package: Transforms

Index

Package: Transforms

Description

package Alog.Transforms is
Abstract package Transforms. Provides methods used by all Alog transforms.

Classes

Instance (abstract)

type Instance is abstract tagged limited private;

Primitive operations:

Transform_Message
Abstract type transform instance. All tranforms in the Alog framework must implement this type.

Types

Class

subtype Class is Instance'Class;

Handle

type Handle is access Class;

Subprograms & Entries

=

function "=" 
(Left: Handle;
Right: Handle) return Boolean;
Equal function.

Set_Name

procedure Set_Name 
(Transform: in out Class;
Name: String);
Set transform name.

Get_Name

function Get_Name 
(Transform: Class) return String;
Get transform name.

Transform_Message (abstract)

function Transform_Message 
(Transform: Instance;
Level: Log_Level;
Msg: String) return String is abstract;
Transform message with specified log level.

Setup

procedure Setup 
(Transform: in out Instance) is null;
Each transform must provide a Setup-procedure. These procedures are called by logger instances when attaching Transforms. All needed operations prior to transforming log messages should be done here.

Teardown

procedure Teardown 
(Transform: in out Instance) is null;
Each transform must provide a Teardown-procedure. These procedures are called by logger instances when detaching Transforms or when the logger object gets out of scope.
libalog-0.4.1/doc/html/api/alog-version.ads.html000066400000000000000000000053261172144577100214670ustar00rootroot00000000000000 Package: Version

Index

Package: Version

Description

package Alog.Version is

Constants & Global variables

Version_Number (Float)

Version_Number : constant Float :=
      0.4;
libalog-0.4.1/doc/html/api/alog.ads.html000066400000000000000000000107371172144577100200060ustar00rootroot00000000000000 Package: Alog

Index

Package: Alog

Description

package Alog is
Alog: Ada Logging Components. Provides easy to use API for different logging facilities and log message transforms.

Types

Log_Level

type Log_Level is
     (Debug,
      Info,
      Notice,
      Warning,
      Error,
      Critical,
      Alert,
      Emergency);
Provided log levels. These log levels can be used to categorize log messages.

Constants & Global variables

Max_Path_Length (Natural)

Max_Path_Length : constant Natural := 128;
Maximal length of path names.

Max_Facilities (Natural)

Max_Facilities : constant Natural := 15;
Maximum number of facilities a single logger instance can manage.
libalog-0.4.1/doc/html/api/index.html000066400000000000000000000152251172144577100174220ustar00rootroot00000000000000 Table of Contents
Packages and source files (A):
Alog (package) at alog.ads:27:9
Alog.Active_Logger (package) at alog-active_logger.ads:34:14
Alog.Controlled_Map (package) at alog-controlled_map.ads:37:14
Alog.Exceptions (package) at alog-exceptions.ads:28:14
Alog.Facilities (package) at alog-facilities.ads:32:14
Alog.Facilities.File_Descriptor (package) at alog-facilities-file_descriptor.ads:27:25
Alog.Facilities.Pgsql (package) at alog-facilities-pgsql.ads:26:25
Alog.Facilities.SMTP (package) at alog-facilities-smtp.ads:30:25
Alog.Facilities.Syslog (package) at alog-facilities-syslog.ads:23:25
Alog.Facilities.XMPP (package) at alog-facilities-xmpp.ads:25:25
Alog.Helpers (package) at alog-helpers.ads:28:14
Alog.Log_Request (package) at alog-log_request.ads:28:14
Alog.Logger (package) at alog-logger.ads:34:14
Alog.Maps (package) at alog-maps.ads:27:14
Alog.Policy_DB (package) at alog-policy_db.ads:27:14
Alog.Protected_Containers (package) at alog-protected_containers.ads:29:14
Alog.Tasked_Logger (package) at alog-tasked_logger.ads:32:14
Alog.Transforms (package) at alog-transforms.ads:26:14
Alog.Transforms.Casing (package) at alog-transforms-casing.ads:24:25
Alog.Version (package) at alog-version.ads:1:14
libalog-0.4.1/doc/html/api/indexeA.html000066400000000000000000000135311172144577100176660ustar00rootroot00000000000000 Table of Contents
Entities (A):
Accept_Dst (subprogram) at alog-policy_db.ads:83:13
Accept_Src (subprogram) at alog-policy_db.ads:75:13
Active_Logger (package) at alog-active_logger.ads:34:14
All_Done (entry) at alog-protected_containers.ads:48:13
All_Done (subprogram) at alog-active_logger.ads:123:14
Alog (package) at alog.ads:27:9
Alog_Default_Level (constant or variable) at alog-policy_db.ads:29:4
Assert_Files_Equal (subprogram) at alog-helpers.ads:30:13
Attach_Default_Facility (subprogram) at alog-active_logger.ads:52:14
Attach_Default_Facility (entry) at alog-tasked_logger.ads:43:13
Attach_Default_Facility (subprogram) at alog-logger.ads:50:14
Attach_Facility (subprogram) at alog-logger.ads:45:14
Attach_Facility (subprogram) at alog-active_logger.ads:47:14
Attach_Facility (entry) at alog-tasked_logger.ads:40:13
Attach_Transform (subprogram) at alog-logger.ads:81:14
Attach_Transform (subprogram) at alog-active_logger.ads:81:14
Attach_Transform (entry) at alog-tasked_logger.ads:64:13
libalog-0.4.1/doc/html/api/indexeB.html000066400000000000000000000044641172144577100176740ustar00rootroot00000000000000 Table of Contents
Entities (B):
BS_Path (package) at alog-facilities.ads:119:12
libalog-0.4.1/doc/html/api/indexeC.html000066400000000000000000000126621172144577100176740ustar00rootroot00000000000000 Table of Contents
Entities (C):
Casing (package) at alog-transforms-casing.ads:24:25
Class (type) at alog-transforms.ads:34:12
Class (type) at alog-facilities.ads:41:12
Clear (subprogram) at alog-maps.ads:81:14
Clear (subprogram) at alog-active_logger.ads:95:14
Clear (subprogram) at alog-controlled_map.ads:71:14
Clear (entry) at alog-tasked_logger.ads:89:13
Clear (subprogram) at alog-logger.ads:109:14
Clear (subprogram) at alog-protected_containers.ads:54:17
Close_Connection (subprogram) at alog-facilities-pgsql.ads:115:14
Close_Logfile (subprogram) at alog-facilities-file_descriptor.ads:48:14
Contains (subprogram) at alog-controlled_map.ads:62:13
Controlled_Map (package) at alog-controlled_map.ads:37:14
Create (subprogram) at alog-log_request.ads:36:13
Cursor (type) at alog-maps.ads:32:9
libalog-0.4.1/doc/html/api/indexeD.html000066400000000000000000000124641172144577100176750ustar00rootroot00000000000000 Table of Contents
Entities (D):
Default_Facility_Name (constant or variable) at alog-logger.ads:145:4
Delete (subprogram) at alog-controlled_map.ads:56:14
Delivery_Failed (constant or variable) at alog-facilities-xmpp.ads:63:4
Delivery_Failed (constant or variable) at alog-facilities-smtp.ads:66:4
Detach_Default_Facility (entry) at alog-tasked_logger.ads:49:13
Detach_Default_Facility (subprogram) at alog-active_logger.ads:62:14
Detach_Default_Facility (subprogram) at alog-logger.ads:60:14
Detach_Facility (entry) at alog-tasked_logger.ads:46:13
Detach_Facility (subprogram) at alog-active_logger.ads:56:14
Detach_Facility (subprogram) at alog-logger.ads:54:14
Detach_Transform (subprogram) at alog-active_logger.ads:86:14
Detach_Transform (entry) at alog-tasked_logger.ads:67:13
Detach_Transform (subprogram) at alog-logger.ads:86:14
Done (subprogram) at alog-protected_containers.ads:45:17
libalog-0.4.1/doc/html/api/indexeE.html000066400000000000000000000071131172144577100176710ustar00rootroot00000000000000 Table of Contents
Entities (E):
Element (subprogram) at alog-controlled_map.ads:50:13
Element (subprogram) at alog-maps.ads:40:13
Element (subprogram) at alog-maps.ads:46:13
Element_Handle (type) at alog-controlled_map.ads:29:9
Element_Type (type) at alog-controlled_map.ads:28:9
Exception_Handler (type) at alog-exceptions.ads:30:9
Exceptions (package) at alog-exceptions.ads:28:14
libalog-0.4.1/doc/html/api/indexeF.html000066400000000000000000000107741172144577100177010ustar00rootroot00000000000000 Table of Contents
Entities (F):
Facilities (package) at alog-facilities.ads:32:14
Facility_Already_Present (constant or variable) at alog-logger.ads:138:4
Facility_Count (subprogram) at alog-logger.ads:64:13
Facility_Count (entry) at alog-tasked_logger.ads:52:13
Facility_Count (subprogram) at alog-active_logger.ads:66:13
Facility_Not_Found (constant or variable) at alog-logger.ads:136:4
Facility_Update_Handle (type) at alog-tasked_logger.ads:34:9
File_Descriptor (package) at alog-facilities-file_descriptor.ads:27:25
Find (subprogram) at alog-maps.ads:49:13
Free (subprogram) at alog-logger.ads:126:14
Free (subprogram) at alog-logger.ads:131:14
libalog-0.4.1/doc/html/api/indexeG.html000066400000000000000000000164211172144577100176750ustar00rootroot00000000000000 Table of Contents
Entities (G):
Get (entry) at alog-protected_containers.ads:42:13
Get_Caller_ID (subprogram) at alog-log_request.ads:44:13
Get_Credentials (subprogram) at alog-facilities-pgsql.ads:112:13
Get_DB_Name (subprogram) at alog-facilities-pgsql.ads:73:13
Get_Default_Loglevel (subprogram) at alog-policy_db.ads:35:13
Get_Header (subprogram) at alog-facilities-smtp.ads:55:13
Get_Host_Name (subprogram) at alog-facilities-pgsql.ads:44:13
Get_Host_Port (subprogram) at alog-facilities-pgsql.ads:53:13
Get_Level_Column_Name (subprogram) at alog-facilities-pgsql.ads:87:13
Get_Log_Level (subprogram) at alog-log_request.ads:50:13
Get_Logfile (subprogram) at alog-facilities-file_descriptor.ads:45:13
Get_Loglevel (subprogram) at alog-policy_db.ads:63:13
Get_Message (subprogram) at alog-log_request.ads:53:13
Get_Message_Column_Name (subprogram) at alog-facilities-pgsql.ads:103:13
Get_Name (subprogram) at alog-facilities.ads:55:13
Get_Name (subprogram) at alog-transforms.ads:49:13
Get_Origin (subprogram) at alog-facilities-syslog.ads:58:13
Get_Queue_Length (subprogram) at alog-active_logger.ads:110:13
Get_Source (subprogram) at alog-log_request.ads:47:13
Get_Table_Name (subprogram) at alog-facilities-pgsql.ads:79:13
Get_Timestamp (subprogram) at alog-facilities.ads:58:13
Get_Timestamp_Column_Name (subprogram) at alog-facilities-pgsql.ads:95:13
libalog-0.4.1/doc/html/api/indexeH.html000066400000000000000000000113301172144577100176700ustar00rootroot00000000000000 Table of Contents
Entities (H):
Handle (type) at alog-facilities-pgsql.ads:31:9
Handle (type) at alog-transforms.ads:36:9
Handle (type) at alog-facilities-xmpp.ads:30:9
Handle (type) at alog-facilities.ads:43:9
Handle (type) at alog-tasked_logger.ads:110:9
Handle (type) at alog-transforms-casing.ads:31:9
Handle (type) at alog-facilities-file_descriptor.ads:32:9
Handle (type) at alog-facilities-smtp.ads:35:9
Handle (type) at alog-facilities-syslog.ads:28:9
Handle (type) at alog-logger.ads:42:9
Handle (type) at alog-active_logger.ads:44:9
Helpers (package) at alog-helpers.ads:28:14
libalog-0.4.1/doc/html/api/indexeI.html000066400000000000000000000203771172144577100177040ustar00rootroot00000000000000 Table of Contents
Entities (I):
Init at alog-tasked_logger.ads:38:24
Insert (subprogram) at alog-maps.ads:74:14
Insert (subprogram) at alog-controlled_map.ads:44:14
Instance (class) at alog-facilities-syslog.ads:25:9
Instance (class) at alog-transforms-casing.ads:28:9
Instance (class) at alog-facilities-xmpp.ads:27:9
Instance (class) at alog-transforms.ads:30:9
Instance (class) at alog-logger.ads:36:9
Instance (task) at alog-tasked_logger.ads:38:14
Instance (class) at alog-log_request.ads:32:9
Instance (class) at alog-facilities-pgsql.ads:28:9
Instance (class) at alog-facilities.ads:37:9
Instance (class) at alog-facilities-file_descriptor.ads:29:9
Instance (class) at alog-facilities-smtp.ads:32:9
Instance (class) at alog-active_logger.ads:36:9
Invalid_Config (constant or variable) at alog-helpers.ads:56:4
Is_Empty (subprogram) at alog-controlled_map.ads:68:13
Is_SQL_Trace (subprogram) at alog-facilities-pgsql.ads:67:13
Is_Terminated (subprogram) at alog-active_logger.ads:120:13
Is_UTC_Timestamp (subprogram) at alog-facilities.ads:90:13
Is_Write_Loglevel (subprogram) at alog-facilities.ads:98:13
Is_Write_Source (subprogram) at alog-facilities.ads:106:13
Is_Write_Timestamp (subprogram) at alog-facilities.ads:87:13
Iterate (subprogram) at alog-logger.ads:103:14
Iterate (subprogram) at alog-active_logger.ads:76:14
Iterate (entry) at alog-tasked_logger.ads:61:13
Iterate (subprogram) at alog-controlled_map.ads:77:14
Iterate (subprogram) at alog-logger.ads:75:14
libalog-0.4.1/doc/html/api/indexeK.html000066400000000000000000000044741172144577100177060ustar00rootroot00000000000000 Table of Contents
Entities (K):
Key_Type (type) at alog-controlled_map.ads:27:9
libalog-0.4.1/doc/html/api/indexeL.html000066400000000000000000000116261172144577100177040ustar00rootroot00000000000000 Table of Contents
Entities (L):
Length (subprogram) at alog-protected_containers.ads:57:16
Length (subprogram) at alog-maps.ads:84:13
Length (subprogram) at alog-controlled_map.ads:74:13
Log_Level (type) at alog.ads:31:9
Log_Message (entry) at alog-tasked_logger.ads:73:13
Log_Message (subprogram) at alog-active_logger.ads:99:14
Log_Message (subprogram) at alog-logger.ads:113:14
Log_Request (package) at alog-log_request.ads:28:14
Log_Request_List (protected) at alog-protected_containers.ads:37:19
Log_Request_Storage (type) at alog-protected_containers.ads:35:9
Logger (package) at alog-logger.ads:34:14
Lookup (subprogram) at alog-maps.ads:56:13
Lookup (subprogram) at alog-policy_db.ads:68:13
libalog-0.4.1/doc/html/api/indexeM.html000066400000000000000000000055551172144577100177110ustar00rootroot00000000000000 Table of Contents
Entities (M):
Map (class) at alog-controlled_map.ads:41:9
Maps (package) at alog-maps.ads:27:14
Max_Facilities (constant or variable) at alog.ads:46:4
Max_Path_Length (constant or variable) at alog.ads:43:4
libalog-0.4.1/doc/html/api/indexeN.html000066400000000000000000000073461172144577100177120ustar00rootroot00000000000000 Table of Contents
Entities (N):
No_Element (constant or variable) at alog-maps.ads:35:4
No_Ident_Loglevel (constant or variable) at alog-policy_db.ads:91:4
No_Recipient (constant or variable) at alog-facilities-xmpp.ads:54:4
No_Recipient (constant or variable) at alog-facilities-smtp.ads:60:4
No_Sender (constant or variable) at alog-facilities-xmpp.ads:51:4
No_Server (constant or variable) at alog-facilities-xmpp.ads:57:4
No_Server (constant or variable) at alog-facilities-smtp.ads:63:4
libalog-0.4.1/doc/html/api/indexeO.html000066400000000000000000000051671172144577100177120ustar00rootroot00000000000000 Table of Contents
Entities (O):
Open_File_Error (constant or variable) at alog-facilities-file_descriptor.ads:53:4
Operation_Mode (type) at alog-transforms-casing.ads:26:9
libalog-0.4.1/doc/html/api/indexeP.html000066400000000000000000000070021172144577100177010ustar00rootroot00000000000000 Table of Contents
Entities (P):
Pending (subprogram) at alog-protected_containers.ads:60:16
Pgsql (package) at alog-facilities-pgsql.ads:26:25
Policy_DB (package) at alog-policy_db.ads:27:14
Process (subprogram) at alog-facilities.ads:65:14
Protected_Containers (package) at alog-protected_containers.ads:29:14
Put (subprogram) at alog-protected_containers.ads:39:17
libalog-0.4.1/doc/html/api/indexeR.html000066400000000000000000000054061172144577100177110ustar00rootroot00000000000000 Table of Contents
Entities (R):
Read_Loglevels (subprogram) at alog-helpers.ads:37:14
Recipient_Not_Present (constant or variable) at alog-facilities-xmpp.ads:60:4
Reset (subprogram) at alog-policy_db.ads:72:14
libalog-0.4.1/doc/html/api/indexeS.html000066400000000000000000000244741172144577100177200ustar00rootroot00000000000000 Table of Contents
Entities (S):
Set_Credentials (subprogram) at alog-facilities-pgsql.ads:106:14
Set_DB_Name (subprogram) at alog-facilities-pgsql.ads:70:14
Set_Default_Loglevel (subprogram) at alog-policy_db.ads:32:14
Set_Except_Handler (entry) at alog-tasked_logger.ads:96:13
Set_Except_Handler (subprogram) at alog-active_logger.ads:127:14
Set_Header (subprogram) at alog-facilities-smtp.ads:50:14
Set_Host_Address (subprogram) at alog-facilities-pgsql.ads:47:14
Set_Host_Name (subprogram) at alog-facilities-pgsql.ads:41:14
Set_Host_Port (subprogram) at alog-facilities-pgsql.ads:50:14
Set_Level_Column_Name (subprogram) at alog-facilities-pgsql.ads:82:14
Set_Logfile (subprogram) at alog-facilities-file_descriptor.ads:38:14
Set_Loglevel (subprogram) at alog-policy_db.ads:38:14
Set_Loglevel (subprogram) at alog-policy_db.ads:60:14
Set_Message_Column_Name (subprogram) at alog-facilities-pgsql.ads:98:14
Set_Mode (subprogram) at alog-transforms-casing.ads:41:14
Set_Name (subprogram) at alog-transforms.ads:44:14
Set_Name (subprogram) at alog-facilities.ads:50:14
Set_Origin (subprogram) at alog-facilities-syslog.ads:53:14
Set_Recipient (subprogram) at alog-facilities-xmpp.ads:39:14
Set_Recipient (subprogram) at alog-facilities-smtp.ads:37:14
Set_Sender (subprogram) at alog-facilities-xmpp.ads:32:14
Set_Server (subprogram) at alog-facilities-smtp.ads:44:14
Set_Server (subprogram) at alog-facilities-xmpp.ads:45:14
Set_SQL_Trace (subprogram) at alog-facilities-pgsql.ads:56:14
Set_Table_Name (subprogram) at alog-facilities-pgsql.ads:76:14
Set_Timestamp_Column_Name (subprogram) at alog-facilities-pgsql.ads:90:14
Setup (subprogram) at alog-facilities-pgsql.ads:34:14
Setup (subprogram) at alog-facilities.ads:109:14
Setup (subprogram) at alog-transforms.ads:59:14
Shutdown (subprogram) at alog-active_logger.ads:113:14
Shutdown (entry) at alog-tasked_logger.ads:93:13
Shutdown_Helper (type) at alog-active_logger.ads:132:9
SMTP (package) at alog-facilities-smtp.ads:30:25
Syslog (package) at alog-facilities-syslog.ads:23:25
Syslog_Origin (type) at alog-facilities-syslog.ads:30:9
libalog-0.4.1/doc/html/api/indexeT.html000066400000000000000000000143231172144577100177110ustar00rootroot00000000000000 Table of Contents
Entities (T):
Tasked_Logger (package) at alog-tasked_logger.ads:32:14
Teardown (subprogram) at alog-facilities-file_descriptor.ads:35:14
Teardown (subprogram) at alog-facilities-pgsql.ads:38:14
Teardown (subprogram) at alog-transforms.ads:64:14
Teardown (subprogram) at alog-facilities.ads:114:14
Toggle_SQL_Trace (subprogram) at alog-facilities-pgsql.ads:62:14
Toggle_UTC_Timestamp (subprogram) at alog-facilities.ads:82:14
Toggle_Write_Loglevel (subprogram) at alog-facilities.ads:93:14
Toggle_Write_Source (subprogram) at alog-facilities.ads:101:14
Toggle_Write_Timestamp (subprogram) at alog-facilities.ads:77:14
Transform_Already_Present (constant or variable) at alog-logger.ads:142:4
Transform_Count (subprogram) at alog-logger.ads:92:13
Transform_Count (subprogram) at alog-active_logger.ads:92:13
Transform_Count (entry) at alog-tasked_logger.ads:70:13
Transform_Message (subprogram) at alog-transforms.ads:52:13
Transform_Message (subprogram) at alog-transforms-casing.ads:34:13
Transform_Not_Found (constant or variable) at alog-logger.ads:140:4
Transforms (package) at alog-transforms.ads:26:14
libalog-0.4.1/doc/html/api/indexeU.html000066400000000000000000000056611172144577100177170ustar00rootroot00000000000000 Table of Contents
Entities (U):
Update (subprogram) at alog-logger.ads:95:14
Update (subprogram) at alog-active_logger.ads:69:14
Update (subprogram) at alog-logger.ads:67:14
Update (entry) at alog-tasked_logger.ads:55:13
libalog-0.4.1/doc/html/api/indexeV.html000066400000000000000000000047731172144577100177230ustar00rootroot00000000000000 Table of Contents
Entities (V):
Version (package) at alog-version.ads:1:14
Version_Number (constant or variable) at alog-version.ads:2:4
libalog-0.4.1/doc/html/api/indexeW.html000066400000000000000000000053011172144577100177100ustar00rootroot00000000000000 Table of Contents
Entities (W):
Wildcard (constant or variable) at alog-maps.ads:37:4
Wildcard_Level_Map (class) at alog-maps.ads:29:9
Write (subprogram) at alog-facilities.ads:70:14
libalog-0.4.1/doc/html/api/indexeX.html000066400000000000000000000045021172144577100177130ustar00rootroot00000000000000 Table of Contents
Entities (X):
XMPP (package) at alog-facilities-xmpp.ads:25:25
libalog-0.4.1/doc/html/api/indexeother.html000066400000000000000000000053421172144577100206300ustar00rootroot00000000000000 Table of Contents
Entities (*):
< (subprogram) at alog-controlled_map.ads:31:18
= (subprogram) at alog-facilities.ads:45:13
= (subprogram) at alog-transforms.ads:38:13
libalog-0.4.1/doc/html/api/indexfA.html000066400000000000000000000152251172144577100176710ustar00rootroot00000000000000 Table of Contents
Packages and source files (A):
Alog (package) at alog.ads:27:9
Alog.Active_Logger (package) at alog-active_logger.ads:34:14
Alog.Controlled_Map (package) at alog-controlled_map.ads:37:14
Alog.Exceptions (package) at alog-exceptions.ads:28:14
Alog.Facilities (package) at alog-facilities.ads:32:14
Alog.Facilities.File_Descriptor (package) at alog-facilities-file_descriptor.ads:27:25
Alog.Facilities.Pgsql (package) at alog-facilities-pgsql.ads:26:25
Alog.Facilities.SMTP (package) at alog-facilities-smtp.ads:30:25
Alog.Facilities.Syslog (package) at alog-facilities-syslog.ads:23:25
Alog.Facilities.XMPP (package) at alog-facilities-xmpp.ads:25:25
Alog.Helpers (package) at alog-helpers.ads:28:14
Alog.Log_Request (package) at alog-log_request.ads:28:14
Alog.Logger (package) at alog-logger.ads:34:14
Alog.Maps (package) at alog-maps.ads:27:14
Alog.Policy_DB (package) at alog-policy_db.ads:27:14
Alog.Protected_Containers (package) at alog-protected_containers.ads:29:14
Alog.Tasked_Logger (package) at alog-tasked_logger.ads:32:14
Alog.Transforms (package) at alog-transforms.ads:26:14
Alog.Transforms.Casing (package) at alog-transforms-casing.ads:24:25
Alog.Version (package) at alog-version.ads:1:14
libalog-0.4.1/doc/html/api/indexsA.html000066400000000000000000000113111172144577100176760ustar00rootroot00000000000000 Table of Contents
Annotated Source Files (A):
libalog-0.4.1/doc/html/api/src_alog-active_logger.ads.html000066400000000000000000001157451172144577100234720ustar00rootroot00000000000000 File: alog-active_logger.ads
  1. -- 
  2. --  Copyright (c) 2009-2011, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Finalization; 
  24.  
  25. with Alog.Facilities; 
  26. with Alog.Transforms; 
  27. with Alog.Tasked_Logger; 
  28. with Alog.Protected_Containers; 
  29. with Alog.Exceptions; 
  30.  
  31. --  Active Logger instance. This logger is an active object and implements 
  32. --  concurrent, asynchronous logging. It provides the same functionality as the 
  33. --  'simple' logger. 
  34. package Alog.Active_Logger is 
  35.  
  36.    type Instance (Init : Boolean) is tagged limited private; 
  37.    --  Active logger instance. Incoming messages (via Log_Message) are put into 
  38.    --  a request queue. This queue is consumed by a logging task. 
  39.    -- 
  40.    --  By default exceptions which occur during asynchronous processing are 
  41.    --  printed to standard error. Use the Set_Except_Handler procedure to 
  42.    --  register a custom exception handler. 
  43.  
  44.    type Handle is access all Instance; 
  45.    --  Handle to active logger type. 
  46.  
  47.    procedure Attach_Facility 
  48.      (Logger   : in out Instance; 
  49.       Facility :        Facilities.Handle); 
  50.    --  Attach a facility to logger instance. 
  51.  
  52.    procedure Attach_Default_Facility (Logger : in out Instance); 
  53.    --  Attach default facility with name Default_Facility_Name to logger 
  54.    --  instance. If the default facility is already attached do nothing. 
  55.  
  56.    procedure Detach_Facility 
  57.      (Logger : in out Instance; 
  58.       Name   :        String); 
  59.    --  Detach a facility with name 'Name' from logger instance. If the facility 
  60.    --  is not found a Facility_Not_Found exception is raised. 
  61.  
  62.    procedure Detach_Default_Facility (Logger : in out Instance); 
  63.    --  Detach default facility with name Default_Facility_Name from logger 
  64.    --  instance. If the default facility is not attached do nothing. 
  65.  
  66.    function Facility_Count (Logger : Instance) return Natural; 
  67.    --  Return number of attached facilites. 
  68.  
  69.    procedure Update 
  70.      (Logger  : in out Instance; 
  71.       Name    :        String; 
  72.       Process :        Tasked_Logger.Facility_Update_Handle); 
  73.    --  Update a specific Facility identified by 'Name'. Call the 'Process' 
  74.    --  procedure to perform the update operation. 
  75.  
  76.    procedure Iterate 
  77.      (Logger  : in out Instance; 
  78.       Process :        Tasked_Logger.Facility_Update_Handle); 
  79.    --  Call 'Process' for all attached facilities. 
  80.  
  81.    procedure Attach_Transform 
  82.      (Logger    : in out Instance; 
  83.       Transform :        Transforms.Handle); 
  84.    --  Attach a transform to logger instance. 
  85.  
  86.    procedure Detach_Transform 
  87.      (Logger : in out Instance; 
  88.       Name   :        String); 
  89.    --  Detach a transform with name 'Name' from logger instance. If the 
  90.    --  transform is not found a Transform_Not_Found exception is raised. 
  91.  
  92.    function Transform_Count (Logger : Instance) return Natural; 
  93.    --  Return number of attached transforms. 
  94.  
  95.    procedure Clear (Logger : in out Instance); 
  96.    --  Clear logger instance. Detach and teardown all attached facilities and 
  97.    --  transforms. 
  98.  
  99.    procedure Log_Message 
  100.      (Logger : in out Instance; 
  101.       Source :        String := ""; 
  102.       Level  :        Log_Level; 
  103.       Msg    :        String); 
  104.    --  Log the given message asynchronously. The message is put into a log 
  105.    --  request queue which is continuously consumed by a logging task. 
  106.    -- 
  107.    --  This procedure is *safe* to call from protected actions (e.g. from an 
  108.    --  entry call statement or rendezvous). 
  109.  
  110.    function Get_Queue_Length (Logger : Instance) return Natural; 
  111.    --  Returns the number of currently queued log messages. 
  112.  
  113.    procedure Shutdown 
  114.      (Logger : in out Instance; 
  115.       Flush  :        Boolean := True); 
  116.    --  Shutdown the active logger. This procedure must be called in order for 
  117.    --  the logger task to be terminated properly. If 'Flush' is set to True the 
  118.    --  procedure will wait for all queued messages to be logged. 
  119.  
  120.    function Is_Terminated (Logger : Instance) return Boolean; 
  121.    --  Returns True if active logger shutdown sequence is complete. 
  122.  
  123.    procedure All_Done (Logger : in out Instance); 
  124.    --  This procedure blocks until all queued logging requests have been 
  125.    --  consumed. 
  126.  
  127.    procedure Set_Except_Handler 
  128.      (Logger : Instance; 
  129.       Proc   : Exceptions.Exception_Handler); 
  130.    --  Set custom exception handler procedure. 
  131.  
  132.    type Shutdown_Helper (Logger : not null access Instance) is private; 
  133.    --  This helper will call Shutdown on the logger given as discriminant when 
  134.    --  it goes out of scope. This relieves the user from having to excplicitly 
  135.    --  call shutdown on an instance of Alog active logger when wanting to 
  136.    --  terminate. Users must make sure to declare any shutdown helper in a 
  137.    --  smaller scope than the active logger on which the helper supposed to 
  138.    --  work. 
  139.  
  140. private 
  141.  
  142.    task type Logging_Task (Parent : not null access Instance); 
  143.    --  This task takes logging requests from the parent's message queue and 
  144.    --  logs them using the parent's backend logger. 
  145.  
  146.    protected type Trigger_Type is 
  147.       procedure Shutdown; 
  148.       entry Stop; 
  149.    private 
  150.       Shutdown_Requested : Boolean := False; 
  151.    end Trigger_Type; 
  152.    --  This trigger is used to terminate the logger task by means of ATC. 
  153.  
  154.    type Instance (Init : Boolean) is tagged limited record 
  155.       Logger_Task   : Logging_Task (Parent => Instance'Access); 
  156.       Backend       : Tasked_Logger.Instance (Init); 
  157.       Message_Queue : Protected_Containers.Log_Request_List; 
  158.       Trigger       : Trigger_Type; 
  159.    end record; 
  160.  
  161.    type Shutdown_Helper (Logger : not null access Instance) is 
  162.      new Ada.Finalization.Controlled with null record; 
  163.  
  164.    overriding 
  165.    procedure Finalize (Helper : in out Shutdown_Helper); 
  166.    --  Call shutdown on the active logger instance specified as discriminat. 
  167.  
  168. end Alog.Active_Logger; 
libalog-0.4.1/doc/html/api/src_alog-controlled_map.ads.html000066400000000000000000000540021172144577100236460ustar00rootroot00000000000000 File: alog-controlled_map.ads
  1. -- 
  2. --  Copyright (c) 2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Finalization; 
  24. with Ada.Containers.Indefinite_Ordered_Maps; 
  25.  
  26. generic 
  27.    type Key_Type (<>) is private; 
  28.    type Element_Type (<>) is limited private; 
  29.    type Element_Handle is access Element_Type; 
  30.  
  31.    with function "<" (Left, Right : Key_Type) return Boolean is <>; 
  32.  
  33. --  Controlled variant of a map. The memory of an element pointed to by a 
  34. --  previously inserted handle is freed upon calling Delete, Clear or during 
  35. --  finalization of the controlled map. Thus control over objects inserted into 
  36. --  this map resides with the controlled map. 
  37. package Alog.Controlled_Map is 
  38.  
  39.    pragma Preelaborate; 
  40.  
  41.    type Map is new Ada.Finalization.Limited_Controlled with private; 
  42.    --  A controlled map container. 
  43.  
  44.    procedure Insert 
  45.      (Container : in out Map; 
  46.       Key       :        Key_Type; 
  47.       New_Item  :        Element_Handle); 
  48.    --  Insert a new element handle with 'Key' into the controlled map. 
  49.  
  50.    function Element 
  51.      (Container : Map; 
  52.       Key       : Key_Type) 
  53.       return Element_Handle; 
  54.    --  Return a handle to an element identified by 'Key'. 
  55.  
  56.    procedure Delete 
  57.      (Container : in out Map; 
  58.       Key       :        Key_Type); 
  59.    --  Delete the element with key 'Key' from the map. Memory of the element is 
  60.    --  freed. 
  61.  
  62.    function Contains 
  63.      (Container : Map; 
  64.       Key       : Key_Type) 
  65.       return Boolean; 
  66.    --  Returns True if an element with key 'Key' is in the map. 
  67.  
  68.    function Is_Empty (Container : Map) return Boolean; 
  69.    --  Returns True if the map is empty. 
  70.  
  71.    procedure Clear (Container : in out Map); 
  72.    --  Remove all elements in the map. Memory of the elements is freed. 
  73.  
  74.    function Length (Container : Map) return Natural; 
  75.    --  Return the current element count. 
  76.  
  77.    procedure Iterate 
  78.      (Container : Map; 
  79.       Process   : not null access procedure (Handle : Element_Handle)); 
  80.    --  Iterate over all elements in the map and call the 'Process' procedure 
  81.    --  for each handle. 
  82.  
  83. private 
  84.  
  85.    overriding 
  86.    procedure Finalize (Container : in out Map); 
  87.    --  Clean up the the controlled map. This will Free all the memory occupied 
  88.    --  by the elements in the map. 
  89.  
  90.    package Map_Of_Elements_Package is new 
  91.      Ada.Containers.Indefinite_Ordered_Maps 
  92.        (Key_Type     => Key_Type, 
  93.         Element_Type => Element_Handle); 
  94.  
  95.    package MOEP renames Map_Of_Elements_Package; 
  96.  
  97.    type Map is new Ada.Finalization.Limited_Controlled with record 
  98.       Data : MOEP.Map; 
  99.    end record; 
  100.  
  101. end Alog.Controlled_Map; 
libalog-0.4.1/doc/html/api/src_alog-exceptions.ads.html000066400000000000000000000116101172144577100230230ustar00rootroot00000000000000 File: alog-exceptions.ads
  1. -- 
  2. --  Copyright (c) 2011, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Exceptions; 
  24. with Ada.Task_Identification; 
  25.  
  26. --  Alog exception package. Contains type definitions for Alog specific 
  27. --  exception handling. 
  28. package Alog.Exceptions is 
  29.  
  30.    type Exception_Handler is not null access procedure 
  31.      (Except : Ada.Exceptions.Exception_Occurrence; 
  32.       Caller : Ada.Task_Identification.Task_Id); 
  33.    --  Exception handler callback procedure. Used to register custom callback 
  34.    --  procedures in active and tasked loggers. 
  35.  
  36. end Alog.Exceptions; 
libalog-0.4.1/doc/html/api/src_alog-facilities-file_descriptor.ads.html000066400000000000000000000357241172144577100261450ustar00rootroot00000000000000 File: alog-facilities-file_descriptor.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Text_IO; 
  24.  
  25. --  File_Descriptor facility. Used to log to a console or file. If no file is 
  26. --  specified by a Set_Logfile()-call, console logging is used. 
  27. package Alog.Facilities.File_Descriptor is 
  28.  
  29.    type Instance is new Alog.Facilities.Instance with private; 
  30.    --  File Descriptor based logging facility. 
  31.  
  32.    type Handle is access all Instance; 
  33.  
  34.    overriding 
  35.    procedure Teardown (Facility : in out Instance); 
  36.    --  Implementation of Teardown-procedure. 
  37.  
  38.    procedure Set_Logfile 
  39.      (Facility : in out Instance; 
  40.       Path     :        String; 
  41.       Append   :        Boolean := True); 
  42.    --  Set logfile to use. If not set, standard output is used for logging. 
  43.    --  Set Append to False if an existing logfile should be overwritten. 
  44.  
  45.    function Get_Logfile (Facility : Instance) return Ada.Text_IO.File_Access; 
  46.    --  Get currently used logfile. 
  47.  
  48.    procedure Close_Logfile 
  49.      (Facility : in out Instance; 
  50.       Remove   :        Boolean := False); 
  51.    --  Close opened logfile. 
  52.  
  53.    Open_File_Error : exception; 
  54.    --  This exception is raised if an error occurs while trying to open a 
  55.    --  logfile. 
  56.  
  57. private 
  58.  
  59.    overriding 
  60.    procedure Write 
  61.      (Facility : Instance; 
  62.       Level    : Log_Level := Info; 
  63.       Msg      : String); 
  64.    --  Implementation of the Write procedure for FD. 
  65.  
  66.    type Instance is new Alog.Facilities.Instance with record 
  67.       Log_File      : aliased Ada.Text_IO.File_Type; 
  68.       --  Logfile used for file based logging. 
  69.  
  70.       Log_File_Ptr  : Ada.Text_IO.File_Access := 
  71.         Ada.Text_IO.Standard_Output; 
  72.       --  Reference to actual log file. Default is Standard_Output. 
  73.  
  74.       Log_File_Name : BS_Path.Bounded_String := 
  75.         To_Bounded_String ("none"); 
  76.       --  File name of log file. 
  77.    end record; 
  78.  
  79. end Alog.Facilities.File_Descriptor; 
libalog-0.4.1/doc/html/api/src_alog-facilities-pgsql.ads.html000066400000000000000000001115011172144577100241020ustar00rootroot00000000000000 File: alog-facilities-pgsql.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with APQ.PostgreSQL.Client; 
  24.  
  25. --  PGSQL facility. Used to log to a Postgresql database. 
  26. package Alog.Facilities.Pgsql is 
  27.  
  28.    type Instance is new Alog.Facilities.Instance with private; 
  29.    --  PGSQL logging facility. 
  30.  
  31.    type Handle is access all Instance; 
  32.  
  33.    overriding 
  34.    procedure Setup (Facility : in out Instance); 
  35.    --  Implementation of Setup-procedure. 
  36.  
  37.    overriding 
  38.    procedure Teardown (Facility : in out Instance); 
  39.    --  Implementation of Teardown-procedure. 
  40.  
  41.    procedure Set_Host_Name (Facility : in out Instance; Hostname : String); 
  42.    --  Set hostname of database server. 
  43.  
  44.    function Get_Host_Name (Facility : Instance) return String; 
  45.    --  Get hostname of database server. 
  46.  
  47.    procedure Set_Host_Address (Facility : in out Instance; Address : String); 
  48.    --  Set ip address of database server. 
  49.  
  50.    procedure Set_Host_Port (Facility : in out Instance; Port : Natural); 
  51.    --  Set port of database server. 
  52.  
  53.    function Get_Host_Port (Facility : Instance) return Natural; 
  54.    --  Get port of database server. 
  55.  
  56.    procedure Set_SQL_Trace 
  57.      (Facility : in out Instance; 
  58.       Filename :        String; 
  59.       Mode     :        APQ.Trace_Mode_Type); 
  60.    --  Set SQL trace parameters. 
  61.  
  62.    procedure Toggle_SQL_Trace 
  63.      (Facility : in out Instance; 
  64.       State    :        Boolean); 
  65.    --  Toggles tracing of SQL statements. 
  66.  
  67.    function Is_SQL_Trace (Facility : Instance) return Boolean; 
  68.    --  Tells whether sql tracing is enabled. 
  69.  
  70.    procedure Set_DB_Name (Facility : in out Instance; DB_Name : String); 
  71.    --  Set name of database. 
  72.  
  73.    function Get_DB_Name (Facility : Instance) return String; 
  74.    --  Get name of database. 
  75.  
  76.    procedure Set_Table_Name (Facility : in out Instance; Table_Name : String); 
  77.    --  Set name of database table. 
  78.  
  79.    function Get_Table_Name (Facility : Instance) return String; 
  80.    --  Get name of database table. 
  81.  
  82.    procedure Set_Level_Column_Name 
  83.      (Facility    : in out Instance; 
  84.       Column_Name : String); 
  85.    --  Set name of log level column. 
  86.  
  87.    function Get_Level_Column_Name (Facility : Instance) return String; 
  88.    --  Get name of log level column. 
  89.  
  90.    procedure Set_Timestamp_Column_Name 
  91.      (Facility    : in out Instance; 
  92.       Column_Name : String); 
  93.    --  Set name of log level column. 
  94.  
  95.    function Get_Timestamp_Column_Name (Facility : Instance) return String; 
  96.    --  Get name of timestamp column. 
  97.  
  98.    procedure Set_Message_Column_Name 
  99.      (Facility    : in out Instance; 
  100.       Column_Name : String); 
  101.    --  Set name of log message column. 
  102.  
  103.    function Get_Message_Column_Name (Facility : Instance) return String; 
  104.    --  Get name of log message column. 
  105.  
  106.    procedure Set_Credentials 
  107.      (Facility : in out Instance; 
  108.       Username :        String; 
  109.       Password :        String); 
  110.    --  Set credentials for the database connection. 
  111.  
  112.    function Get_Credentials (Facility : Instance) return String; 
  113.    --  Get credentials of database connection. Only the username is returned. 
  114.  
  115.    procedure Close_Connection (Facility : in out Instance); 
  116.    --  Close open database connection. 
  117.  
  118. private 
  119.  
  120.    overriding 
  121.    procedure Write 
  122.      (Facility : Instance; 
  123.       Level    : Log_Level := Info; 
  124.       Msg      : String); 
  125.    --  Implementation of the Write procedure for PGSQL. 
  126.  
  127.    type Log_SQL_Table is tagged record 
  128.       Name             : Unbounded_String := To_Unbounded_String ("alog"); 
  129.       Level_Column     : Unbounded_String := To_Unbounded_String ("level"); 
  130.       Timestamp_Column : Unbounded_String := To_Unbounded_String ("timestamp"); 
  131.       Message_Column   : Unbounded_String := To_Unbounded_String ("message"); 
  132.    end record; 
  133.    --  Holds Table/Column name information. 
  134.  
  135.    type Instance is new Alog.Facilities.Instance with record 
  136.       Log_Connection   : APQ.PostgreSQL.Client.Connection_Type; 
  137.       --  Database connection used for logging. 
  138.  
  139.       Trace_Filename   : Unbounded_String := 
  140.         To_Unbounded_String ("./trace.sql"); 
  141.       Trace_Mode       :  APQ.Trace_Mode_Type := APQ.Trace_APQ; 
  142.       --  SQL trace parameters 
  143.  
  144.       Log_Table        : Log_SQL_Table; 
  145.       --  Table to insert messages 
  146.    end record; 
  147.  
  148. end Alog.Facilities.Pgsql; 
libalog-0.4.1/doc/html/api/src_alog-facilities-smtp.ads.html000066400000000000000000000446111172144577100237460ustar00rootroot00000000000000 File: alog-facilities-smtp.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21.  
  22. with Ada.Characters.Latin_1; 
  23.  
  24. with AWS; 
  25.  
  26. with GNAT.Sockets; 
  27.  
  28. --  SMTP-Logging facility. Used to send log-messages to a configurable 
  29. --  mailserver. AWS must be installed for this facility to work. 
  30. package Alog.Facilities.SMTP is 
  31.  
  32.    type Instance is new Alog.Facilities.Instance with private; 
  33.    --  SMTP based logging facility. 
  34.  
  35.    type Handle is access all Instance; 
  36.  
  37.    procedure Set_Recipient 
  38.      (Facility : in out Instance; 
  39.       Name     :        String; 
  40.       EMail    :        String); 
  41.    --  Set recipient for log-messages. This procedure MUST be called before 
  42.    --  subsequent calls to Write_Message(). 
  43.  
  44.    procedure Set_Server 
  45.      (Facility : in out Instance; 
  46.       Name     :        String); 
  47.    --  Set server for log-messages. This procedure MUST be called before 
  48.    --  subsequent calls to Write_Message(). 
  49.  
  50.    procedure Set_Header 
  51.      (Facility : in out Instance; 
  52.       Header   :        String); 
  53.    --  Set Message-Header of log-messages. 
  54.  
  55.    function Get_Header (Facility : Instance) return String; 
  56.    --  Get actual Message-Header of log-messages. 
  57.  
  58.    --  Exceptions. 
  59.  
  60.    No_Recipient    : exception; 
  61.    --  No recipient specified. Cannot send mail. 
  62.  
  63.    No_Server       : exception; 
  64.    --  No server specified. Cannot send mail. 
  65.  
  66.    Delivery_Failed : exception; 
  67.    --  Mail could not be delivered. 
  68.  
  69. private 
  70.  
  71.    overriding 
  72.    procedure Write 
  73.      (Facility : Instance; 
  74.       Level    : Log_Level := Info; 
  75.       Msg      : String); 
  76.    --  Implementation of the Write procedure for SMTP. 
  77.  
  78.    function Format_Message 
  79.      (Facility : Instance; 
  80.       Level    : Log_Level; 
  81.       Msg      : String) 
  82.       return String; 
  83.    --  Compose a message from Msg, Header, Loglevel, Timestamp, PID. 
  84.  
  85.    EOL : constant Character := Ada.Characters.Latin_1.LF; 
  86.    --  EOL used in mail-messages. 
  87.  
  88.    type Mail_Address is tagged record 
  89.       Name  : Unbounded_String; 
  90.       EMail : Unbounded_String; 
  91.    end record; 
  92.    --  Holds Sender / Recipient information. 
  93.  
  94.    type Instance is new Alog.Facilities.Instance with record 
  95.       Server       : Unbounded_String; 
  96.       --  Server to connect when sending log-mails. 
  97.  
  98.       Is_Server    : Boolean := False; 
  99.       --  Indicates whether a server is set. 
  100.  
  101.       Recipient    : Mail_Address; 
  102.       --  Recipient for log-mails. Must be specified before calling 
  103.       --  Write_Message(), else No_Recipient exception is thrown. 
  104.  
  105.       Is_Recipient : Boolean := False; 
  106.       --  Indicates whether a recipient is set. 
  107.  
  108.       Sender       : Mail_Address := 
  109.         (Name  => To_Unbounded_String ("alog"), 
  110.          EMail => To_Unbounded_String ("alog@" & 
  111.            GNAT.Sockets.Host_Name)); 
  112.       --  Notification sender address/name. 
  113.  
  114.       Subject      : Unbounded_String := To_Unbounded_String 
  115.         ("Log-Message"); 
  116.       --  Subject of messages from Alog-System (default: Alog: Log-Message). 
  117.  
  118.       Header       : Unbounded_String := To_Unbounded_String 
  119.         ("This is a message from the Alog-logsystem running on host " 
  120.          & GNAT.Sockets.Host_Name & ":" & EOL & EOL); 
  121.       --  Message-Header. Can be set by calling Set_Header(). 
  122.    end record; 
  123.  
  124. end Alog.Facilities.SMTP; 
libalog-0.4.1/doc/html/api/src_alog-facilities-syslog.ads.html000066400000000000000000000301231172144577100242740ustar00rootroot00000000000000 File: alog-facilities-syslog.ads
  1. -- 
  2. --  Copyright (c) 2008-2011, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21.  
  22. --  Syslog facility: Used to log to systems syslog. 
  23. package Alog.Facilities.Syslog is 
  24.  
  25.    type Instance is new Alog.Facilities.Instance with private; 
  26.    --  Syslog based logging facility. 
  27.  
  28.    type Handle is access all Instance; 
  29.  
  30.    type Syslog_Origin is 
  31.      (LOG_AUTH, 
  32.       LOG_AUTHPRIV, 
  33.       LOG_CRON, 
  34.       LOG_DAEMON, 
  35.       LOG_FTP, 
  36.       LOG_KERN, 
  37.       LOG_LOCAL0, 
  38.       LOG_LOCAL1, 
  39.       LOG_LOCAL2, 
  40.       LOG_LOCAL3, 
  41.       LOG_LOCAL4, 
  42.       LOG_LOCAL5, 
  43.       LOG_LOCAL6, 
  44.       LOG_LOCAL7, 
  45.       LOG_LPR, 
  46.       LOG_MAIL, 
  47.       LOG_NEWS, 
  48.       LOG_SYSLOG, 
  49.       LOG_USER, 
  50.       LOG_UUCP); 
  51.    --  Syslog facilties. Specifies what type of program is logging the message. 
  52.  
  53.    procedure Set_Origin 
  54.      (Facility : in out Instance; 
  55.       Value    :        Syslog_Origin); 
  56.    --  Set origin of syslog message. 
  57.  
  58.    function Get_Origin (Facility : Instance) return Syslog_Origin; 
  59.    --  Return currently set syslog origin of given facility. 
  60.  
  61. private 
  62.  
  63.    overriding 
  64.    procedure Write 
  65.      (Facility : Instance; 
  66.       Level    : Log_Level := Info; 
  67.       Msg      : String); 
  68.    --  Implementation of the Write procedure for syslog. 
  69.  
  70.    type Instance is new Alog.Facilities.Instance with record 
  71.       Origin : Syslog_Origin := LOG_USER; 
  72.    end record; 
  73.  
  74. end Alog.Facilities.Syslog; 
libalog-0.4.1/doc/html/api/src_alog-facilities-xmpp.ads.html000066400000000000000000000404651172144577100237520ustar00rootroot00000000000000 File: alog-facilities-xmpp.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21.  
  22. --  XMPP-Logging (jabber) facility. 
  23. --  Send log-messages to a configured Jabber ID via a given jabber server. 
  24. --  AWS must be installed for this facility to work. 
  25. package Alog.Facilities.XMPP is 
  26.  
  27.    type Instance is new Alog.Facilities.Instance with private; 
  28.    --  XMPP based logging facility. 
  29.  
  30.    type Handle is access all Instance; 
  31.  
  32.    procedure Set_Sender 
  33.      (Facility : in out Instance; 
  34.       JID      :        String; 
  35.       Password :        String); 
  36.    --  Set sender for log messages. This procedure MUST be called before 
  37.    --  subsequent calls to Write_Message(). 
  38.  
  39.    procedure Set_Recipient 
  40.      (Facility : in out Instance; 
  41.       JID      :        String); 
  42.    --  Set recipient for log-messages. This procedure MUST be called before 
  43.    --  subsequent calls to Write_Message(). 
  44.  
  45.    procedure Set_Server 
  46.      (Facility : in out Instance; 
  47.       Name     :        String); 
  48.    --  Set server for log-messages. This procedure MUST be called before 
  49.    --  subsequent calls to Write_Message(). 
  50.  
  51.    No_Sender             : exception; 
  52.    --  No sender ID specified. Cannot send message. 
  53.  
  54.    No_Recipient          : exception; 
  55.    --  No recipient specified. Cannot send message. 
  56.  
  57.    No_Server             : exception; 
  58.    --  No server specified. Cannot send message. 
  59.  
  60.    Recipient_Not_Present : exception; 
  61.    --  Recipient can not be reached through specified server. 
  62.  
  63.    Delivery_Failed       : exception; 
  64.    --  Message could not be delivered. 
  65.  
  66. private 
  67.  
  68.    overriding 
  69.    procedure Write 
  70.      (Facility : Instance; 
  71.       Level    : Log_Level := Info; 
  72.       Msg      : String); 
  73.    --  Implementation of the Write procedure for XMPP. 
  74.  
  75.    type Sender_Account is tagged 
  76.       record 
  77.          JID      : Unbounded_String; 
  78.          Password : Unbounded_String; 
  79.       end record; 
  80.    --  Holds sender information. 
  81.  
  82.    type Instance is new Alog.Facilities.Instance with record 
  83.       Sender       : Sender_Account := 
  84.         (JID      => To_Unbounded_String ("alog@localhost"), 
  85.          Password => To_Unbounded_String ("")); 
  86.       --  Notification sender JID/password. 
  87.  
  88.       Is_Sender    : Boolean := False; 
  89.       --  Indicates whether sender id is set. 
  90.  
  91.       Server       : Unbounded_String; 
  92.       --  Server to connect to. 
  93.  
  94.       Is_Server    : Boolean := False; 
  95.       --  Indicates whether a server is set. 
  96.  
  97.       Recipient    : Unbounded_String; 
  98.       --  Recipient for log-mails. Must be specified before calling 
  99.       --  Write_Message(), else No_Recipient exception is thrown. 
  100.  
  101.       Is_Recipient : Boolean := False; 
  102.       --  Indicates whether a recipient is set. 
  103.  
  104.       Subject      : Unbounded_String := 
  105.         To_Unbounded_String ("Alog: Log-Message"); 
  106.       --  Subject of messages from Alog-System (default: Alog: Log-Message). 
  107.    end record; 
  108.  
  109. end Alog.Facilities.XMPP; 
libalog-0.4.1/doc/html/api/src_alog-facilities.ads.html000066400000000000000000000667021172144577100227720ustar00rootroot00000000000000 File: alog-facilities.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Strings.Bounded; 
  24. with Ada.Strings.Unbounded; 
  25. with Ada.Command_Line; 
  26. with Ada.Calendar; 
  27.  
  28. with Alog.Log_Request; 
  29.  
  30. --  Alog facilities package. Provides common data and methods used by all 
  31. --  facilities. 
  32. package Alog.Facilities is 
  33.  
  34.    use Ada.Strings.Bounded; 
  35.    use Ada.Strings.Unbounded; 
  36.  
  37.    type Instance is abstract tagged limited private; 
  38.    --  Abstract type facility instance. All facilities in the Alog framework 
  39.    --  must implement this type. 
  40.  
  41.    subtype Class is Instance'Class; 
  42.  
  43.    type Handle is access all Class; 
  44.  
  45.    function "=" 
  46.      (Left  : Handle; 
  47.       Right : Handle) return Boolean; 
  48.    --  Equal function. 
  49.  
  50.    procedure Set_Name 
  51.      (Facility : in out Class; 
  52.       Name     :        String); 
  53.    --  Set facility name. 
  54.  
  55.    function Get_Name (Facility : Class) return String; 
  56.    --  Get facility name. 
  57.  
  58.    function Get_Timestamp 
  59.      (Facility : Class; 
  60.       Time     : Ada.Calendar.Time := Ada.Calendar.Clock) 
  61.       return String; 
  62.    --  Creates a timestamp and returns it as String. If no Time is given, the 
  63.    --  current time is used. 
  64.  
  65.    procedure Process 
  66.      (Facility : Class; 
  67.       Request  : Log_Request.Instance); 
  68.    --  Process a log request. 
  69.  
  70.    procedure Write 
  71.      (Facility : Instance; 
  72.       Level    : Log_Level := Info; 
  73.       Msg      : String) is abstract; 
  74.    --  Write message with specified log level. This procedure must be 
  75.    --  implemented by all facilities. 
  76.  
  77.    procedure Toggle_Write_Timestamp 
  78.      (Facility : in out Class; 
  79.       State    :        Boolean); 
  80.    --  Enable/disable whether a timestamp is written for log messages. 
  81.  
  82.    procedure Toggle_UTC_Timestamp 
  83.      (Facility : in out Class; 
  84.       State    :        Boolean); 
  85.    --  Enable/disable UTC timestamps for log messages. 
  86.  
  87.    function Is_Write_Timestamp (Facility : Class) return Boolean; 
  88.    --  Returns the current value of Write_Timestamp. 
  89.  
  90.    function Is_UTC_Timestamp (Facility : Class) return Boolean; 
  91.    --  Returns True if the timestamp of the facility is written in UTC time. 
  92.  
  93.    procedure Toggle_Write_Loglevel 
  94.      (Facility : in out Class; 
  95.       State    :        Boolean); 
  96.    --  Enable/disable whether the loglevel is written for log messages. 
  97.  
  98.    function Is_Write_Loglevel (Facility : Class) return Boolean; 
  99.    --  Returns the current value of Write_Loglevel. 
  100.  
  101.    procedure Toggle_Write_Source 
  102.      (Facility : in out Class; 
  103.       State    :        Boolean); 
  104.    --  Enable/disable whether the source of the message is logged. 
  105.  
  106.    function Is_Write_Source (Facility : Class) return Boolean; 
  107.    --  Returns True if writing of log message sources is enabled. 
  108.  
  109.    procedure Setup (Facility : in out Instance) is null; 
  110.    --  Each facility must provide a Setup-procedure. These procedures are 
  111.    --  called by Logger instances when attaching Facilities. All needed 
  112.    --  operations prior to writing log messages should be done here. 
  113.  
  114.    procedure Teardown (Facility : in out Instance) is null; 
  115.    --  Each facility must provide a Teardown-procedure. These procedures are 
  116.    --  called by Logger instances when detaching Facilities or when the logger 
  117.    --  object gets out of scope. 
  118.  
  119.    package BS_Path is new Generic_Bounded_Length (Max_Path_Length); 
  120.    use BS_Path; 
  121.    --  Bounded string with length Max_Path_Length. Used in methods which 
  122.    --  involve filesystem operations. 
  123.  
  124. private 
  125.  
  126.    type Instance is abstract tagged limited record 
  127.       Name             : Unbounded_String := 
  128.         To_Unbounded_String (Ada.Command_Line.Command_Name); 
  129.       --  Facility Name. Defaults to command-name (first argument). If multiple 
  130.       --  facilities are used, names must be set differently. 
  131.  
  132.       Timestamp_Format : String (1 .. 11) := "%b %d %Y %T"; 
  133.       --  Default timestamp format to use in this facility. 
  134.  
  135.       Write_Timestamp  : Boolean := True; 
  136.       --  If True, a timestamp is written with the log message. 
  137.  
  138.       UTC_Timestamp    : Boolean := False; 
  139.       --  If True, the timestamp is written in UTC time. 
  140.       --  (log message timestamps are written timezone-dependent). 
  141.  
  142.       Write_Loglevel   : Boolean := False; 
  143.       --  If True, the loglevel associated with the log message is written. 
  144.  
  145.       Write_Source     : Boolean := True; 
  146.       --  If True, the source of a log message is prepended to the message. 
  147.    end record; 
  148.  
  149. end Alog.Facilities; 
libalog-0.4.1/doc/html/api/src_alog-helpers.ads.html000066400000000000000000000222721172144577100223120ustar00rootroot00000000000000 File: alog-helpers.ads
  1. -- 
  2. --  Copyright (c) 2008-2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Direct_IO; 
  24.  
  25. with Alog.Maps; 
  26.  
  27. --  Alog helper functions/procedures. 
  28. package Alog.Helpers is 
  29.  
  30.    function Assert_Files_Equal 
  31.      (Filename1 : String; 
  32.       Filename2 : String) 
  33.       return Boolean; 
  34.    --  Compare two files byte-wise. Returns True if both files are equal. 
  35.    --  The two files are closed but not removed after comparison. 
  36.  
  37.    procedure Read_Loglevels 
  38.      (Filename      :        String; 
  39.       Default_Level : in out Log_Level; 
  40.       Identifiers   :    out Maps.Wildcard_Level_Map); 
  41.    --  Read default loglevels and (optional) identifier based loglevels from 
  42.    --  file given by filename. The format is as follows: 
  43.    -- 
  44.    --  # This is a comment (ignored) 
  45.    -- 
  46.    --  # Default loglevel 
  47.    --  Default = Info 
  48.    -- 
  49.    --  # Identifier-specific loglevels 
  50.    --  Foo.* = Debug 
  51.    --  Foo.Bar = Info 
  52.    -- 
  53.    --  If no default loglevel setting is found in the file, the loglevel passed 
  54.    --  as Default_Level parameter is returned unchanged. 
  55.  
  56.    Invalid_Config : exception; 
  57.    --  Exception is raised if a loglevel config file is invalid. 
  58.  
  59. private 
  60.    type My_Rec is record 
  61.       Char : Character; 
  62.    end record; 
  63.  
  64.    package D_IO is new Ada.Direct_IO (My_Rec); 
  65.    use D_IO; 
  66.  
  67. end Alog.Helpers; 
libalog-0.4.1/doc/html/api/src_alog-log_request.ads.html000066400000000000000000000304531172144577100232010ustar00rootroot00000000000000 File: alog-log_request.ads
  1. -- 
  2. --  Copyright (c) 2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Task_Identification; 
  24. with Ada.Strings.Unbounded; 
  25.  
  26. --  Log request type. Log request objects are used for asynchronous logging and 
  27. --  hold all relevant information of a log request. 
  28. package Alog.Log_Request is 
  29.  
  30.    use Ada.Task_Identification; 
  31.  
  32.    type Instance is tagged private; 
  33.    --  A log request contains all related information to log asynchronously 
  34.    --  (Caller identification, loglevel and message). 
  35.  
  36.    function Create 
  37.      (ID      : Task_Id   := Current_Task; 
  38.       Source  : String    := ""; 
  39.       Level   : Log_Level := Debug; 
  40.       Message : String) 
  41.       return Instance; 
  42.    --  Create a log request object from the specified parameters. 
  43.  
  44.    function Get_Caller_ID (Request : Instance) return Task_Id; 
  45.    --  Return the caller ID of the request object. 
  46.  
  47.    function Get_Source (Request : Instance) return String; 
  48.    --  Return the source of the request object. 
  49.  
  50.    function Get_Log_Level (Request : Instance) return Log_Level; 
  51.    --  Return the loglevel of the request object. 
  52.  
  53.    function Get_Message (Request : Instance) return String; 
  54.    --  Return the log message of the request object. 
  55.  
  56. private 
  57.  
  58.    type Instance is tagged record 
  59.       Caller_ID : Task_Id   := Null_Task_Id; 
  60.       Source    : Ada.Strings.Unbounded.Unbounded_String; 
  61.       Level     : Log_Level := Info; 
  62.       Message   : Ada.Strings.Unbounded.Unbounded_String; 
  63.    end record; 
  64.  
  65. end Alog.Log_Request; 
libalog-0.4.1/doc/html/api/src_alog-logger.ads.html000066400000000000000000001150041172144577100221230ustar00rootroot00000000000000 File: alog-logger.ads
  1. -- 
  2. --  Copyright (c) 2008, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Finalization; 
  24. with Ada.Unchecked_Deallocation; 
  25. with Ada.Strings.Unbounded; 
  26.  
  27. with Alog.Facilities; 
  28. with Alog.Transforms; 
  29. with Alog.Controlled_Map; 
  30.  
  31. --  Logger instance. Facilities can be attached to a logger instance in order 
  32. --  to log to different targets simultaneously. A logger provides different 
  33. --  helper functions for logging facilities configuration. 
  34. package Alog.Logger is 
  35.  
  36.    type Instance (Init : Boolean) is tagged limited private; 
  37.    --  Logger instance. The Init discriminant defines whether or not a default 
  38.    --  'stdout' (FD facility without logfile set) is attached automatically. 
  39.    --- Set Init to 'True' if you want to make sure minimal stdout logging is 
  40.    --  possible as soon as a new logger is instantiated. 
  41.  
  42.    type Handle is access all Instance; 
  43.    --  Handle to logger type. 
  44.  
  45.    procedure Attach_Facility 
  46.      (Logger   : in out Instance; 
  47.       Facility :        Facilities.Handle); 
  48.    --  Attach a facility to logger instance. 
  49.  
  50.    procedure Attach_Default_Facility (Logger : in out Instance); 
  51.    --  Attach default facility with name Default_Facility_Name to logger 
  52.    --  instance. If the default facility is already attached do nothing. 
  53.  
  54.    procedure Detach_Facility 
  55.      (Logger : in out Instance; 
  56.       Name   :        String); 
  57.    --  Detach a facility with name 'Name' from logger instance. If the facility 
  58.    --  is not found a Facility_Not_Found exception is raised. 
  59.  
  60.    procedure Detach_Default_Facility (Logger : in out Instance); 
  61.    --  Detach default facility with name Default_Facility_Name from logger 
  62.    --  instance. If the default facility is not attached do nothing. 
  63.  
  64.    function Facility_Count (Logger : Instance) return Natural; 
  65.    --  Return number of attached facilites. 
  66.  
  67.    procedure Update 
  68.      (Logger  : Instance; 
  69.       Name    : String; 
  70.       Process : not null access 
  71.         procedure (Facility_Handle : Facilities.Handle)); 
  72.    --  Update a specific Facility identified by 'Name'. Call the 'Process' 
  73.    --  procedure to perform the update operation. 
  74.  
  75.    procedure Iterate 
  76.      (Logger  : Instance; 
  77.       Process : not null access 
  78.         procedure (Facility_Handle : Facilities.Handle)); 
  79.    --  Call 'Process' for all attached facilities. 
  80.  
  81.    procedure Attach_Transform 
  82.      (Logger    : in out Instance; 
  83.       Transform :        Transforms.Handle); 
  84.    --  Attach a transform to logger instance. 
  85.  
  86.    procedure Detach_Transform 
  87.      (Logger : in out Instance; 
  88.       Name   :        String); 
  89.    --  Detach a transform with name 'Name' from logger instance. If the 
  90.    --  transform is not found a Transform_Not_Found exception is raised. 
  91.  
  92.    function Transform_Count (Logger : Instance) return Natural; 
  93.    --  Return number of attached transforms. 
  94.  
  95.    procedure Update 
  96.      (Logger  : Instance; 
  97.       Name    : String; 
  98.       Process : not null access 
  99.         procedure (Transform_Handle : Transforms.Handle)); 
  100.    --  Update a specific Transform identified by 'Name'. Call the 'Process' 
  101.    --  procedure to perform the update operation. 
  102.  
  103.    procedure Iterate 
  104.      (Logger  : Instance; 
  105.       Process : not null access 
  106.         procedure (Transform_Handle : Transforms.Handle)); 
  107.    --  Call 'Process' for all attached transforms. 
  108.  
  109.    procedure Clear (L : in out Instance); 
  110.    --  Clear logger instance. Detach and teardown all attached facilities and 
  111.    --  transforms. 
  112.  
  113.    procedure Log_Message 
  114.      (Logger : Instance; 
  115.       Source : String := ""; 
  116.       Level  : Log_Level; 
  117.       Msg    : String); 
  118.    --  Log a message. The Write_Message() procedure of all attached facilities 
  119.    --  is called. Depending on the Log-Threshold set, the message is logged to 
  120.    --  different targets (depending on the facilites) automatically. 
  121.    -- 
  122.    --  Prior to actually processing the given log message the policy database 
  123.    --  is inquired if the log message with given source and level should be 
  124.    --  logged. 
  125.  
  126.    procedure Free is new Ada.Unchecked_Deallocation 
  127.      (Object => Facilities.Class, 
  128.       Name   => Facilities.Handle); 
  129.    --  Free memory allocated by a facility. 
  130.  
  131.    procedure Free is new Ada.Unchecked_Deallocation 
  132.      (Object => Transforms.Class, 
  133.       Name   => Transforms.Handle); 
  134.    --  Free memory allocated by a transform. 
  135.  
  136.    Facility_Not_Found        : exception; 
  137.    --  Will be raised if a requested facility is not found. 
  138.    Facility_Already_Present  : exception; 
  139.    --  Will be raised if a facility is already present. 
  140.    Transform_Not_Found       : exception; 
  141.    --  Will be raised if a requested transform is not found. 
  142.    Transform_Already_Present : exception; 
  143.    --  Will be raised if a facility is already present. . 
  144.  
  145.    Default_Facility_Name : constant String := "__Default_Facility"; 
  146.  
  147. private 
  148.  
  149.    use Ada.Strings.Unbounded; 
  150.    use Alog.Facilities; 
  151.    use Alog.Transforms; 
  152.  
  153.    procedure Initialize (Logger : in out Instance); 
  154.    --  Initialize the logger instance. 
  155.  
  156.    procedure Finalize (Logger : in out Instance); 
  157.    --  Finalize procedure used to cleanup. 
  158.  
  159.    package Map_Of_Transforms_Package is new Alog.Controlled_Map 
  160.      (Key_Type       => Unbounded_String, 
  161.       Element_Type   => Transforms.Class, 
  162.       Element_Handle => Transforms.Handle); 
  163.  
  164.    package MOTP renames Map_Of_Transforms_Package; 
  165.  
  166.    package Map_Of_Facilities_Package is new Alog.Controlled_Map 
  167.      (Key_Type       => Unbounded_String, 
  168.       Element_Type   => Facilities.Class, 
  169.       Element_Handle => Facilities.Handle); 
  170.  
  171.    package MOFP renames Map_Of_Facilities_Package; 
  172.  
  173.    type Instance (Init : Boolean) is new 
  174.      Ada.Finalization.Limited_Controlled with record 
  175.       Facilities   : MOFP.Map; 
  176.       --  Attached facilities. 
  177.  
  178.       Transforms   : MOTP.Map; 
  179.       --  Attached transforms. 
  180.    end record; 
  181.  
  182. end Alog.Logger; 
libalog-0.4.1/doc/html/api/src_alog-maps.ads.html000066400000000000000000000464061172144577100216150ustar00rootroot00000000000000 File: alog-maps.ads
  1. -- 
  2. --  Copyright (c) 2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Strings.Unbounded.Hash; 
  24. with Ada.Containers.Hashed_Maps; 
  25.  
  26. --  Alog maps package. Provides map data types. 
  27. package Alog.Maps is 
  28.  
  29.    type Wildcard_Level_Map is tagged private; 
  30.    --  A map of loglevels with string as key type. 
  31.  
  32.    type Cursor is private; 
  33.    --  Index for a map element. 
  34.  
  35.    No_Element : constant Cursor; 
  36.  
  37.    Wildcard   : constant Character := '*'; 
  38.    --  Character used as wildcard indicator in lookups. 
  39.  
  40.    function Element 
  41.      (Map : Wildcard_Level_Map; 
  42.       Key : String) 
  43.       return Log_Level; 
  44.    --  Returns the loglevel element for given key. 
  45.  
  46.    function Element (Position : Cursor) return Log_Level; 
  47.    --  Returns the loglevel element at given position. 
  48.  
  49.    function Find 
  50.      (Map : Wildcard_Level_Map; 
  51.       Key : String) 
  52.       return Cursor; 
  53.    --  Returns the position for an element with specified key. If no element is 
  54.    --  found No_Element is returned. 
  55.  
  56.    function Lookup 
  57.      (Map : Wildcard_Level_Map; 
  58.       Key : String) 
  59.       return Cursor; 
  60.    --  Returns the position of the element with the closest match to given key. 
  61.    --  This function considers wildcards when searching for an element. 
  62.    -- 
  63.    --  Example:      Key   | Element 
  64.    --             ------------------- 
  65.    --              Foo.*   |  Debug 
  66.    --              Foo.Bar |  Alert 
  67.    -- 
  68.    --  A lookup for "Foo.Foo" has no exact match. The next closest match is 
  69.    --  "Foo.*" which will return the Debug element. Looking for "Foo" will 
  70.    --  return Debug since it matches the wildcard "Foo.*". 
  71.    -- 
  72.    --  If no exact and wildcard match is found No_Element is returned. 
  73.  
  74.    procedure Insert 
  75.      (Map  : in out Wildcard_Level_Map; 
  76.       Key  :        String; 
  77.       Item :        Log_Level); 
  78.    --  Insert given key/item pair into map. If given key is already present the 
  79.    --  associated item is replaced. 
  80.  
  81.    procedure Clear (Map : in out Wildcard_Level_Map); 
  82.    --  Clears the wildcard map. 
  83.  
  84.    function Length (Map : Wildcard_Level_Map) return Natural; 
  85.    --  Return the number of elements in the map. 
  86.  
  87. private 
  88.  
  89.    use Ada.Strings.Unbounded; 
  90.  
  91.    package Map_Of_Loglevels_Package is new Ada.Containers.Hashed_Maps 
  92.      (Key_Type        => Unbounded_String, 
  93.       Element_Type    => Log_Level, 
  94.       Hash            => Hash, 
  95.       Equivalent_Keys => "="); 
  96.  
  97.    package MOLP renames Map_Of_Loglevels_Package; 
  98.  
  99.    type Wildcard_Level_Map is tagged record 
  100.       Data : MOLP.Map; 
  101.    end record; 
  102.  
  103.    type Cursor is new MOLP.Cursor; 
  104.  
  105.    No_Element : constant Cursor := Cursor (MOLP.No_Element); 
  106.  
  107. end Alog.Maps; 
libalog-0.4.1/doc/html/api/src_alog-policy_db.ads.html000066400000000000000000000372751172144577100226250ustar00rootroot00000000000000 File: alog-policy_db.ads
  1. -- 
  2. --  Copyright (c) 2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Alog.Maps; 
  24.  
  25. --  Logging policy database package. This DB stores logging policies. Policies 
  26. --  in the database are used inside the framework for logging decisions. 
  27. package Alog.Policy_DB is 
  28.  
  29.    Alog_Default_Level : constant Log_Level := Info; 
  30.    --  Framework default loglevel. 
  31.  
  32.    procedure Set_Default_Loglevel (Level : Log_Level); 
  33.    --  Set given loglevel as default loglevel. 
  34.  
  35.    function Get_Default_Loglevel return Log_Level; 
  36.    --  Return current default loglevel. 
  37.  
  38.    procedure Set_Loglevel 
  39.      (Identifier : String; 
  40.       Level      : Log_Level); 
  41.    --  Set given loglevel for specified identifier string. If the identifier is 
  42.    --  already present the loglevel is updated. Identifier strings are 
  43.    --  case-sensitive. 
  44.    -- 
  45.    --  Use wildcards to specify a loglevel for a range of identifiers. 
  46.    --  Identifier hierarchies are separated by dots, the wildcard is '*'. The 
  47.    --  following example sets a Debug loglevel for all log-identifiers in 
  48.    --  Foo.Bar (including Foo.Bar). 
  49.    -- 
  50.    --  Example: 
  51.    --     Foo.Bar.* = Debug 
  52.    -- 
  53.    --  Direct matches take precedence over wildcard matches. In the following 
  54.    --  example the loglevel for identifier 'Foo.Bar' is explicitly set to Info. 
  55.    -- 
  56.    --  Example: 
  57.    --     Foo.Bar   = Info 
  58.    --     Foo.Bar.* = Debug 
  59.  
  60.    procedure Set_Loglevel (Identifiers : Maps.Wildcard_Level_Map); 
  61.    --  Apply loglevels for identifiers stored in map. 
  62.  
  63.    function Get_Loglevel (Identifier : String) return Log_Level; 
  64.    --  Return loglevel for given identifier string. Raises No_Ident_Loglevel 
  65.    --  exception if no entry for given identifier is found (exact match only, 
  66.    --  no wildcard lookup). 
  67.  
  68.    function Lookup (Identifier : String) return Log_Level; 
  69.    --  Return loglevel for given identifier string. Returns the closest match, 
  70.    --  if no associated loglevel is found the default loglevel is returned. 
  71.  
  72.    procedure Reset; 
  73.    --  Reset the logging policy database to the initial state. 
  74.  
  75.    function Accept_Src 
  76.      (Identifier : String := ""; 
  77.       Level      : Log_Level) 
  78.       return Boolean; 
  79.    --  Returns True if the given loglevel is accepted for a source identifier. 
  80.    --  If no identifier is given, the loglevel is verified against the default 
  81.    --  loglevel. 
  82.  
  83.    function Accept_Dst 
  84.      (Identifier : String; 
  85.       Level      : Log_Level) 
  86.       return Boolean; 
  87.    --  Returns True if the given loglevel is accepted for a destination 
  88.    --  identifier. If no match for the given identifier is found True is 
  89.    --  returned. 
  90.  
  91.    No_Ident_Loglevel : exception; 
  92.    --  Will be raised if loglevel is not found for a requested identifier. 
  93.  
  94. end Alog.Policy_DB; 
libalog-0.4.1/doc/html/api/src_alog-protected_containers.ads.html000066400000000000000000000334131172144577100250650ustar00rootroot00000000000000 File: alog-protected_containers.ads
  1. -- 
  2. --  Copyright (c) 2009, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Containers.Doubly_Linked_Lists; 
  24.  
  25. with Alog.Log_Request; 
  26.  
  27. --  Alog Protected Containers. This package provides protected containers which 
  28. --  are safe for concurrent access. 
  29. package Alog.Protected_Containers is 
  30.  
  31.    ---------------------- 
  32.    -- Log_Request_List -- 
  33.    ---------------------- 
  34.  
  35.    type Log_Request_Storage is private; 
  36.  
  37.    protected type Log_Request_List is 
  38.  
  39.       procedure Put (Element : Log_Request.Instance); 
  40.       --  Put an element at the end of the request list. 
  41.  
  42.       entry Get (Element : out Log_Request.Instance); 
  43.       --  Get the first element from the list (and delete it). 
  44.  
  45.       procedure Done; 
  46.       --  Signal successfull processing of request previously gotten from list. 
  47.  
  48.       entry All_Done; 
  49.       --  This procedure blocks until the list is empty and there are no 
  50.       --  pending requests. A requests is pending when it is taken off the list 
  51.       --  via Get but it's successfull processing has not been signaled back 
  52.       --  via the procedure Done. 
  53.  
  54.       procedure Clear; 
  55.       --  Clear the request list by deleting all log requests. 
  56.  
  57.       function Length return Natural; 
  58.       --  Return the number of elements in the list. 
  59.  
  60.       function Pending return Natural; 
  61.       --  Return the number of pending requests. 
  62.  
  63.    private 
  64.  
  65.       Requests           : Log_Request_Storage; 
  66.       Requests_Available : Boolean := False; 
  67.       Pending_Counter    : Natural := 0; 
  68.  
  69.    end Log_Request_List; 
  70.    --  Protected variant of a log request list. This list holds log request 
  71.    --  objects and is safe for concurrent access. It operates in FIFO-Mode. 
  72.  
  73. private 
  74.  
  75.    use type Alog.Log_Request.Instance; 
  76.  
  77.    package List_Of_Log_Requests_Package is 
  78.      new Ada.Containers.Doubly_Linked_Lists 
  79.        (Element_Type => Log_Request.Instance); 
  80.  
  81.    package LOLRP renames List_Of_Log_Requests_Package; 
  82.  
  83.    type Log_Request_Storage is new LOLRP.List with null record; 
  84.  
  85. end Alog.Protected_Containers; 
libalog-0.4.1/doc/html/api/src_alog-tasked_logger.ads.html000066400000000000000000000503361172144577100234640ustar00rootroot00000000000000 File: alog-tasked_logger.ads
  1. -- 
  2. --  Copyright (c) 2009-2011, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Task_Identification; 
  24.  
  25. with Alog.Exceptions; 
  26. with Alog.Facilities; 
  27. with Alog.Transforms; 
  28.  
  29. --  Tasked Logger instance. Facilities can be attached to this logger instance 
  30. --  in order to log to different targets simultaneously. This instance provides 
  31. --  task-safe concurrent logging. 
  32. package Alog.Tasked_Logger is 
  33.  
  34.    type Facility_Update_Handle is not null access 
  35.      procedure (Facility_Handle : Facilities.Handle); 
  36.    --  Handle to facility update procedure. 
  37.  
  38.    task type Instance (Init : Boolean := False) is 
  39.  
  40.       entry Attach_Facility (Facility : Facilities.Handle); 
  41.       --  Attach a facility to tasked logger instance. 
  42.  
  43.       entry Attach_Default_Facility; 
  44.       --  Attach default facility to tasked logger instance. 
  45.  
  46.       entry Detach_Facility (Name : String); 
  47.       --  Detach a facility from tasked logger instance. 
  48.  
  49.       entry Detach_Default_Facility; 
  50.       --  Detach default facility from tasked logger instance. 
  51.  
  52.       entry Facility_Count (Count : out Natural); 
  53.       --  Return number of attached facilites. 
  54.  
  55.       entry Update 
  56.         (Name    : String; 
  57.          Process : Facility_Update_Handle); 
  58.       --  Update a specific facility identified by 'Name'. Calls the 'Process' 
  59.       --  procedure to perform the update operation. 
  60.  
  61.       entry Iterate (Process : Facility_Update_Handle); 
  62.       --  Call 'Process' for all attached facilities. 
  63.  
  64.       entry Attach_Transform (Transform : Transforms.Handle); 
  65.       --  Attach a transform to tasked logger instance. 
  66.  
  67.       entry Detach_Transform (Name : String); 
  68.       --  Detach a transform from tasked logger instance. 
  69.  
  70.       entry Transform_Count (Count : out Natural); 
  71.       --  Return number of attached transforms. 
  72.  
  73.       entry Log_Message 
  74.         (Source : String := ""; 
  75.          Level  : Log_Level; 
  76.          Msg    : String; 
  77.          Caller : Ada.Task_Identification.Task_Id := 
  78.            Ada.Task_Identification.Null_Task_Id); 
  79.       --  Log a message. The Write_Message() procedure of all attached 
  80.       --  facilities is called. Depending on the Log-Threshold set, the message 
  81.       --  is logged to different targets (depending on the facilites) 
  82.       --  automatically. If an exception occurs, the exception handler 
  83.       --  procedure is called. 
  84.       -- 
  85.       --  If caller is not specified the executing task's ID is used instead. 
  86.       --  Since Log_Message'Caller can not be used as default parameter the 
  87.       --  entry checks if the variable is set to 'Null_Task_Id' in the body. 
  88.  
  89.       entry Clear; 
  90.       --  Clear tasked logger instance. Detach and teardown all attached 
  91.       --  facilities and transforms and clear any stored exceptions. 
  92.  
  93.       entry Shutdown; 
  94.       --  Explicitly shutdown tasked logger. 
  95.  
  96.       entry Set_Except_Handler (Proc : Exceptions.Exception_Handler); 
  97.       --  Set custom exception handler procedure. 
  98.  
  99.    end Instance; 
  100.    --  Tasked logger instance. The Init discriminant defines whether or not a 
  101.    --  default 'stdout' (FD facility without logfile set) is attached 
  102.    --  automatically. Default is 'False'. Set Init to 'True' if you want to 
  103.    --  make sure minimal stdout logging is possible as soon as a new logger is 
  104.    --  instantiated. 
  105.    -- 
  106.    --  By default exceptions which occur during asynchronous processing are 
  107.    --  printed to standard error. Use the Set_Except_Handler entry to register 
  108.    --  a custom exception handler. 
  109.  
  110.    type Handle is access all Instance; 
  111.    --  Handle to tasked logger type. 
  112.  
  113. end Alog.Tasked_Logger; 
libalog-0.4.1/doc/html/api/src_alog-transforms-casing.ads.html000066400000000000000000000254511172144577100243120ustar00rootroot00000000000000 File: alog-transforms-casing.ads
  1. -- 
  2. --  Copyright (c) 2008, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. --  Casing transform. Used to transform casing (lower/uppercase) of messages 
  24. package Alog.Transforms.Casing is 
  25.  
  26.    type Operation_Mode is (Uppercase, Lowercase); 
  27.  
  28.    type Instance is new Alog.Transforms.Instance with private; 
  29.    --  Casing transform. 
  30.  
  31.    type Handle is access all Instance; 
  32.  
  33.    overriding 
  34.    function Transform_Message 
  35.      (Transform : Instance; 
  36.       Level     : Log_Level := Info; 
  37.       Msg       : String) 
  38.       return String; 
  39.    --  Implementation of Transform_Message. 
  40.  
  41.    procedure Set_Mode 
  42.      (Transform : in out Instance; 
  43.       Mode      :        Operation_Mode); 
  44.    --  Set operation mode of transform. 
  45.  
  46. private 
  47.  
  48.    type Instance is new Alog.Transforms.Instance with record 
  49.       Mode  : Operation_Mode := Lowercase; 
  50.       --  Mode of operation. 
  51.    end record; 
  52.  
  53. end Alog.Transforms.Casing; 
libalog-0.4.1/doc/html/api/src_alog-transforms.ads.html000066400000000000000000000336251172144577100230520ustar00rootroot00000000000000 File: alog-transforms.ads
  1. -- 
  2. --  Copyright (c) 2008, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. with Ada.Strings.Unbounded; 
  24.  
  25. --  Abstract package Transforms. Provides methods used by all Alog transforms. 
  26. package Alog.Transforms is 
  27.  
  28.    use Ada.Strings.Unbounded; 
  29.  
  30.    type Instance is abstract tagged limited private; 
  31.    --  Abstract type transform instance. All tranforms in the Alog framework 
  32.    --  must implement this type. 
  33.  
  34.    subtype Class is Instance'Class; 
  35.  
  36.    type Handle is access Class; 
  37.  
  38.    function "=" 
  39.      (Left  : Handle; 
  40.       Right : Handle) 
  41.       return Boolean; 
  42.    --  Equal function. 
  43.  
  44.    procedure Set_Name 
  45.      (Transform : in out Class; 
  46.       Name      :        String); 
  47.    --  Set transform name. 
  48.  
  49.    function Get_Name (Transform : Class) return String; 
  50.    --  Get transform name. 
  51.  
  52.    function Transform_Message 
  53.      (Transform : Instance; 
  54.       Level     : Log_Level; 
  55.       Msg       : String) 
  56.       return String is abstract; 
  57.    --  Transform message with specified log level. 
  58.  
  59.    procedure Setup (Transform : in out Instance) is null; 
  60.    --  Each transform must provide a Setup-procedure. These procedures are 
  61.    --  called by logger instances when attaching Transforms. All needed 
  62.    --  operations prior to transforming log messages should be done here. 
  63.  
  64.    procedure Teardown (Transform : in out Instance) is null; 
  65.    --  Each transform must provide a Teardown-procedure. These procedures are 
  66.    --  called by logger instances when detaching Transforms or when the logger 
  67.    --  object gets out of scope. 
  68.  
  69. private 
  70.  
  71.    type Instance is abstract tagged limited record 
  72.       Name : Unbounded_String := To_Unbounded_String ("sample-transform"); 
  73.       --  Transform Name. Names must be unique. 
  74.    end record; 
  75.  
  76. end Alog.Transforms; 
libalog-0.4.1/doc/html/api/src_alog-version.ads.html000066400000000000000000000035001172144577100223260ustar00rootroot00000000000000 File: alog-version.ads
  1. package Alog.Version is 
  2.    Version_Number : constant Float := 
  3.       0.4; 
  4. end Alog.Version; 
libalog-0.4.1/doc/html/api/src_alog.ads.html000066400000000000000000000126351172144577100206540ustar00rootroot00000000000000 File: alog.ads
  1. -- 
  2. --  Copyright (c) 2008, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. pragma Detect_Blocking; 
  24.  
  25. --  Alog: Ada Logging Components. Provides easy to use API for different 
  26. --  logging facilities and log message transforms. 
  27. package Alog is 
  28.  
  29.    pragma Preelaborate; 
  30.  
  31.    type Log_Level is 
  32.      (Debug, 
  33.       Info, 
  34.       Notice, 
  35.       Warning, 
  36.       Error, 
  37.       Critical, 
  38.       Alert, 
  39.       Emergency); 
  40.    --  Provided log levels. These log levels can be used to categorize log 
  41.    --  messages. 
  42.  
  43.    Max_Path_Length : constant Natural := 128; 
  44.    --  Maximal length of path names. 
  45.  
  46.    Max_Facilities : constant Natural := 15; 
  47.    --  Maximum number of facilities a single logger instance 
  48.    --  can manage. 
  49.  
  50. end Alog; 
libalog-0.4.1/doc/html/api/support/000077500000000000000000000000001172144577100171345ustar00rootroot00000000000000libalog-0.4.1/doc/html/api/support/docgen.css000066400000000000000000000200421172144577100211030ustar00rootroot00000000000000body { background: #F4F4F4; font-family: arial, verdana; font-size: 90%; margin: 0px 0px 10px 205px; height: 100%; } h1, h2 { padding: 0px 0px 0px 5px; margin: 0px; font-variant: small-caps; font-size: 1.1em; } h3, h4 { font-size: 1.0em; } a:link, a:active, a:visited { text-decoration: none; color: blue; } a:hover { color: red; } a.hide:link, a.hide:active, a.hide:hover, a.hide:visited { color: black; margin-right: 5px; } *:target { background: #E4E4F4; } pre { margin: 0px; } div.topBar { position: fixed; top: 0px; left: 0px; margin: 0px; margin-left: 193px; width: 100%; padding-bottom: 10px; z-index: 1; background: transparent url(../support/images/menubarbottom.png) repeat-x bottom; } div.topBarInside { padding-top: 10px; padding-bottom: 5px; width: 100%; background: transparent url(../support/images/menubar.png) repeat-x top; } div.topBarLinks { z-index: 1; padding: 0px; margin-top: 0px; margin-right: 20px; margin-left: 10px; text-align: left; } /* Generate page layout */ div#leftSide { position: fixed; top: 0px; left: 0px; width: 205px; margin: 0px; padding: 0px; padding-bottom: 31px; background: transparent url(../support/images/sidebarframebottom.png) no-repeat bottom; z-index: 20; font-size: 0.9em; } div#leftSide div#leftSideInside { width: 205px; padding-top: 5px; margin: 0px; border: 0px; background: url(../support/images/sidebarframe.png) no-repeat; } div#leftSideInside div { padding-top: 10px; margin-top: 0px; } div#leftSideInside .button { position: relative; width: 185px; background: transparent url(../support/images/nav1_btn_up.png) no-repeat right; height: 27px; padding: 3px 0px 0px 5px; z-index: 10; } div#leftSideInside a .button { color: #2020A0; } div#leftSideInside a:hover .button { color: #A02020; background: transparent url(../support/images/nav1_btn_mo.png) no-repeat right; } div#leftSideInside a { position: relative; z-index: 1; } div#leftSideInside i .button2, div#leftSideInside a .button2 { position: relative; margin: -6px 0px 0px 0px; height: 26px; width: 183px; padding: 5px 0px 0px 5px; background: transparent url(../support/images/nav2_btn_up.png) no-repeat right 0px; list-style-type: none; list-style-position: inside; z-index: 1; } div#leftSideInside i .button2 { color: #802020; } div#leftSideInside a .button2 { color: #2020A0; } div#leftSideInside a:hover .button2 { color: #A02020; background: transparent url(../support/images/nav2_btn_mo.png) no-repeat right 0px; } #rightSide { float: right; width: 205px; margin: 0px 0px 0px 0px; padding: 0px; padding-bottom: 31px; background: transparent url(../support/images/rightsidebottom.png) no-repeat bottom; font-size: 0.8em; } div#rightSideInside { width: 193px; padding-top: 10px; padding-left: 12px; margin: 0px; border: 0px; background: url(../support/images/rightside.png) repeat; } div#Index ul { margin: 2px 0px 0px 0px; padding: 0px 0px 0px 0px; } div#Index li { width: 193px; list-style-type: none; list-style-position: outside; border-top: 1px dotted #c0c0c0; } div#Index li a { color: #2020A0; padding-left: 20px; } div#Index li a:hover { color: #E04040; } div#Index li.package-spec a { background: transparent url(../support/images/package-spec.png) no-repeat 3px 0px; } div#Index li.task-spec, div#Index li.protected-spec, div#Index li.var-spec { background: transparent url(../support/images/variable-spec.png) no-repeat 3px 0px; } div#Index li.class-spec, div#Index li.task-type-spec, div#Index li.protected-type-spec, div#Index li.type-spec { background: transparent url(../support/images/type-spec.png) no-repeat 3px 0px; } div#Index li.subp-spec { background: transparent url(../support/images/subprogram-spec.png) no-repeat 3px 0px; } /* Styles within each region */ #documentation { margin: 0px 0px 0px 0px; padding: 0px 210px 10px 0px; } div.title, div.titleTopBar { text-align: center; padding: 0px 0px 0px 5px; font-weight: bold; font-variant: small-caps; font-size: 1.1em; } div.title { padding-top: 10px; } div.titleTopBar { margin-top: 100px; } div.subprograms { font-size: 90%; margin: 10px 0px 0px 0px; } div.subprograms .class { border: 1px solid #c0c0c0; margin-top: 5px; padding: 0px; } div.subprograms .name { color: red; } div.subprograms .name_emphasis { color: red; font-weight: bold; } div.subprograms h3 { background: #dae3fe; padding: 0px 0px 0px 5px; margin: 0px 0px 0px 0px; } div.subprograms h4 { padding: 0px; margin: 0px; } div.subprograms div.profile { font-family: courier new, courier; padding: 5px 5px 5px 5px; background: white; } div.subprograms div.details { font-family: courier new, courier; padding-top: 0px; padding-left: 5px; padding-top: 3px; padding-bottom: 3px; background: #fafaff; } div.subprograms div.details div { padding-left: 0px; } div.subprograms div.details table { margin-left: 20px; border-collapse: collapse; } div.subprograms div.details table td { border:0px; padding:0px; vertical-align: top; } div.subprograms div.details span.keyword { font-weight: bold; color: #970505; } div.subprograms div.details span.string { font-style: italic; color: #0A9988; } div.subprograms div.details span.comment { color: #209020; } div.subprograms div.comment { border-top: 1px dotted #c0c0c0; background: white; padding-left: 5px; padding-top: 0px; padding-bottom: 0px; white-space: pre-wrap; } div.subprograms div.comment * { margin: 0px; padding-top: 3px; padding-bottom: 3px; white-space: normal; } div.subprograms .type, div.subprograms .type * { padding-left: 0px; font-weight: normal; } div.subprograms div.entries { padding: 0px; border: 1px solid #c0c0c0; } div.subprograms div.parameters, div.subprograms div.parameters { font-family: courier new, courier; background: #eee; } div.subprograms div.parameters div, div.subprograms div.details div { padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border: 0px;} div.entity { font-size: 0.9em; margin-left: 20px; } div.classroot, div.classtree { position: relative; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; } div.classroot { background: transparent url(../support/images/tree_root.png) no-repeat left 0px; margin-bottom: 3px; } div.classtree { background: transparent url(../support/images/tree_item.png) no-repeat left 0px; } div.classtreechildren { position: relative; top: -4px; margin: 0px 0px 0px 8px; padding: 0px 0px 7px 0px; background: transparent url(../support/images/treechildren_bg_bottom.png) no-repeat left bottom; } div.classtreechildreninside { margin: 0px 0px 0px 0px; padding: 0px 0px 5px 8px; background: transparent url(../support/images/treechildren_bg.png) repeat-y left; } div.classroot h3, div.classtree h3 { position: relative; height: 30px; font-weight: normal; padding: 4px 0px 0px 15px; margin: 0px 0px -6px 0px; z-index: 5; } .droplink { text-align:left; position:relative; height:2.5em; margin:0; list-style-type:none; padding-right:12px; background: transparent url(../support/images/link.png) no-repeat center right; text-decoration: underline; } .droplink ul { visibility:hidden; position:absolute; top:1.2em; left:0; height:0; overflow:hidden; list-style-type:none; margin:0; padding:0; z-index:10; } .droplink:hover ul { visibility:visible; height:auto; width:10em; background:#eee; border:1px solid #ddd; overflow:visible; } .droplink li { font-size: 12px; padding-left: 5px; } /* For printing we do not want the table of contents nor the index */ @media print { body { margin: 10px; } #rightSide { display: none; } #leftSide { display: none; } #documentation { margin: 10px; } #droplink ul { display: none; } } libalog-0.4.1/doc/html/api/support/docgen.js000066400000000000000000000156041172144577100207370ustar00rootroot00000000000000myGetAttribute = function (elt, attribute) { if (attribute == "class") attribute = "className"; return elt[attribute]; } mySetAttribute = function (elt, attribute, value) { if (attribute == "class") attribute = "className"; elt[attribute] = value; } function setHidingLinks() { onloadDoc(); } function onloadDoc() { if (!document.getElementsByTagName) { return; } if (!document.getElementById) { return; } var main = document.getElementById ('leftSideInside'); var link1, link2; setLinksForTag ('h2', ''); link1 = setLinksForTag ('h3', ''); link2 = setLinksForTag ('h4', 'hidden'); if (link1 | link2) { div=document.createElement('div'); main.appendChild (div); div=document.createElement('div'); div.setAttribute ('class', 'button'); div.setAttribute ('className', 'button'); /* for Internet Explorer */ text=document.createTextNode('Unfold'); div.appendChild (text); lnk=document.createElement ("a"); lnk.setAttribute ('href', '#'); lnk.onclick = function () {showAllTags ('h3'); return false;} lnk.appendChild (div); main.appendChild (lnk); var h4s = document.getElementsByTagName ('h4'); if (h4s.length > 0) { div=document.createElement('div'); div.setAttribute ('class', 'button'); div.setAttribute ('className', 'button'); /* for Internet Explorer */ text=document.createTextNode('Unfold all'); div.appendChild (text); lnk=document.createElement ("a"); lnk.setAttribute ('href', '#'); lnk.onclick = function () {showAllTags ('h3'); showAllTags ('h4'); return false;} lnk.appendChild (div); main.appendChild (lnk); } div=document.createElement('div'); div.setAttribute ('class', 'button'); div.setAttribute ('className', 'button'); /* for Internet Explorer */ text=document.createTextNode('Fold all'); div.appendChild (text); lnk=document.createElement ("a"); lnk.setAttribute ('href', '#'); lnk.onclick = function () {hideAllTags ('h4'); hideAllTags ('h3'); return false;} lnk.appendChild (div); main.appendChild (lnk); } tags=document.getElementsByTagName('a'); for (var j=0; j -1)) { tags[j].onclick = function() {showLocationFromA(this); return true} } } // Should open a referenced entity ref = document.location.hash; if (ref != '') { if (ref.indexOf('#') > -1) { ref = ref.substr (1); showLocation (ref); elem = document.getElementById (ref); if (elem) window.scrollTo (0,elem.offsetTop); } } } function sortElem(a,b) { return a[0].toLowerCase() > b[0].toLowerCase() ? 1 : -1; } function printIndexList (names) { if (names.length > 1) { names.sort (sortElem); document.write ('
    '); for (var j = 0; j < names.length; j++) { if (names[j][0] != 'dummy') { document.write ('
  • '+names[j][0]+'
  • '); } } document.write ('
'); } } function setLinksForTag (tag, defaultstate) { var titles = document.getElementsByTagName (tag); for (var i=0; i▼ text=document.createTextNode('â–¼'); lnk=document.createElement("a"); lnk.setAttribute ('href', '#'); lnk.setAttribute ('class', 'hide'); lnk.setAttribute ('className', 'hide'); /* for Internet Explorer */ lnk.appendChild(text); lnk.onclick = function () {toggle(this); return false;} titles[i].insertBefore (lnk, titles[i].firstChild); if (defaultstate == 'hidden') toggle (lnk); } } return titles.length > 0; } function showLocationFromA (tag) { var href = tag.getAttribute('href'); url = href.substr (0, href.indexOf('#')); while (url.indexOf('/') > -1) url = url.substr (url.indexOf('/') + 1); myurl = document.location.pathname; while (myurl.indexOf('/') > -1) myurl = myurl.substr (myurl.indexOf('/') + 1); if ((url != myurl) && (url != '')) return true; href = href.substr (href.indexOf('#') + 1); showLocation (href); } function showLocation (loc) { var links = document.getElementsByTagName('a'); for (var j=0; j < links.length; j++) { if (links[j].getAttribute ('name') == loc) { var parent = links[j].parentNode; while (parent != document) { var elem = parent.firstChild; if (elem.firstChild != null) if (elem.firstChild.nodeValue == 'â–º') toggle (elem); if (parent.tagName.toLowerCase() == 'div') { for (var k=0; k < parent.childNodes.length; k++) { if (parent.childNodes[k].nodeType == 1 && parent.childNodes[k].firstChild != null && parent.childNodes[k].firstChild.nodeType == 1 && parent.childNodes[k].firstChild.tagName.toLowerCase() == 'a') { elem = parent.childNodes[k].firstChild; if (elem.firstChild != null) if (elem.firstChild.nodeValue == 'â–º') toggle (elem); } } } parent = parent.parentNode; } return; } } return; } function hideAllTags (tag) { if (!document.getElementsByTagName) { return; } var titles = document.getElementsByTagName (tag); for (var i=0; i1H.-*ƒ%ƒƒƒC%Ã*†ŒÒŒQŒóŸ2250]bÖ`nd¾ËbÃ2•™5›õ*›Û&vö™œ¬œÍ\Ì\mÜÜÜy¤x–òóâ æ{Æ_- $°ZÐMð‘P£°¢ða‘tQ^Ñ­bqâœâ[%R$…%JUHëJ?‘™#*'(wV¾GÁG‘Wñ‚Òå(%•ת[ÕÕý4d5ÞjîÓš¨ªc­+¤ûJïˆþ|ƒÃ(#KcIãß&÷L›­0ï·¨°L´ò±¶°Qµ±c±ûjÿÜá¶ã§cÎ{]¶º®w[é¾Ôc‘çB¯Þ }û.ó[å¿>`kàÞ cÁçCn…> ûÁ)¥mã—ß’0;qsÒÙäç©Liré6Q™UY³²÷äÜËcÊW/ð),.š]|¸äm™D¹KEa弪³Õkõêâë'5küÝlÐ’Þ:¯íz‡`§wW{÷á^†>ûþº û&þŸì8¥uê‰é¼3‚gΚõhŽÖÜ’yûp- [´xñÇ¥Ë&,¸ÒxUëê›ku×5­¿¹Ñ`SÇæ[­¶MÝþa§ï®U{8ö¦ï;~@ý`ç¡×GüŽn>.~¢öä“ÓÞg¶œ“=ß~áÓ¥¸Ë§®Z\[vCôfë­¯wÒïÞ¼ïóàÀ#ÓÇ«Ÿ*>›ùBðe×kæ7uo¾/ýðéSÁçw_ó¾½û‘ÿóÃïâ?ßþUýÿ. ‹ < 1gAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF9IDATxڄα 0ÁŸ€Mˆi?J)"º“eƒQÒ‡H™–DNj\tqPZþRO×ZœúV‚ª{dIEND®B`‚libalog-0.4.1/doc/html/api/support/images/arrow_open.png000066400000000000000000000054651172144577100232740ustar00rootroot00000000000000‰PNG  IHDR à‘ pHYs  šœ OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFPIDATxÚŒÉ §:°;°«¡[Æ<<ˆ’Ìg™l˜/ø’*Ð.TßST‡e%šz"ôhºŠ»€êXÄç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-Û cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFŒIDATxÚbüÿÿ?!ÀÄ@$`jhX"E\œ±¡a’ô»wžüøñËrÖ¬Š3ÿÿÿÿÃÈÈÈ’–ÖaÂÁÁv\HˆE†‘)-­ÃŒƒƒíø¿,ß¿W:'(xÏÆŸ5«â#Ôh¸Næ@†¿ëa&300üad```øÿÿ?²hVç Fb 0-*Fû•¿içIEND®B`‚libalog-0.4.1/doc/html/api/support/images/menubar.png000066400000000000000000000003431172144577100225400ustar00rootroot00000000000000‰PNG  IHDRŸ ‘©'sRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØÞƒ€ÊcIDATXÃíÎAÃ0 Á-ÿÿfnuý/Ûe¡”¤@°D>×IˆHTB_×DJìK*<-ý})±%«`¯]zoàÝ÷d½br½Ná‰1ÆcŒ1ÆcŒ1ðufhÇ­mµýIEND®B`‚libalog-0.4.1/doc/html/api/support/images/menubarbottom.png000066400000000000000000000002471172144577100237700ustar00rootroot00000000000000‰PNG  IHDR uÒ4JsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEØoa K'IDAT×5Á±°ðŸRmMÞh§’¨ª†œ`+˜Á:¾½ñíR½6×IEND®B`‚libalog-0.4.1/doc/html/api/support/images/nav1_btn_mo.png000066400000000000000000000144131172144577100233150ustar00rootroot00000000000000‰PNG  IHDRÍDJIM pHYs  šœ OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF&IDATxÚì\íŽ$· d×Ä0÷œøuäp|ŽUù!Q¬¢Ô³—ß7»ÛÛM·DId±Xd¼¯÷õ¾Ž ÀÏ1"âù;>¾~ýú¶Îûz_÷ë§µQ¾FÄoë5~™a&ÿ•Ÿ¬ß#"f<𝱉±[æûܯs}nÝM>\Ïf}Pž9oT}¡> ïŸïïö>‡M{Jy¼õ‰6ë§Ý…÷û†Ù‚mXl­Ä`佯2ÎxÀ»—,Q‡GIð0W›WšCæro½ m Ük¦VAp³ÅžËnwv­Ïú]ÇhVÜc`‰ü¶vˆŸ#â/ñ§ˆø!"ð58#Ð ,ÆÂº´ƒXa,G"Àõ|ðd`5Þo¡E>@œ}[m̦9ÈÝ&ûƒuœ¸ÙšTƒºÛ8ß×ç qÂéÛÈ笢p>ûéëÞƒÊÆü<6ºáˆ¶“·]ém˜÷C-<Ô3s®dÆm¾Ñö~Ÿ:}F XöJ>ñkÝѬ¿×9툴"Àý l&[Ê(—Цô›ÚÍH“æëú‹޵×BñIŠG?Jw„‚¢¼A~_®k‘mîs‘sn”üúlÌ{F Ö0¶§ Pc±ó´À“ßÎ푲œÏ§³äv2õî…R²Ú$ÒÀhöw4'•í¶ e!åkgôD cÙFÇS=ZS«Œy¤U馦¼ÛMôH+6¥D*H”š~m$´€ˆ5gkÓ³GOöEÍÏÛEüY6Ìñ%"ðQa4wyy`£uV=Ö'×@·W¡Þ ≠ëN ñbX} º¹ùY†/Œykfw@Mäg"¶‡Ù ˜ÜQÍ‘F*4Ë¢þö[;ØiT†/ºrÏX[xàh‹©ú®ë ËöóOFÚé¸@ŸÙÈ ,wÅò,/W…¨ÊVú¼ô-ËQæ((s©¡™ëÞ 7Z™oÁÖÀ!¶aÑÏüN¨ sêöði»ˆø1"~× ñ±=ôÄ<Ó/@Ph[4Ô‡°6Çá…’mƒæâÔ0¬®©ðá„ #F`Mü\À;ŒÆ ëÒcp/Œí]7ÝžQr©²ƒxO–+ó(Üt¼íÁ7|°I3l€1ÆmsiÄñèp+ŸSÏ{Úi+kÙ2Fáê ±Ç‚eÉ.#pG³±üÜ‘‰}ò¾;*3Zn² 4g(ù@®lÔ‘ã­›}5¤Àr¾¼$©L‰A¿±ÝíúØøY//øµc1^ÒZj„H/"ø3ï†Ú{béSáÍ…‘5ô žÝ‘âÏô1Àd™ï¹Í2 $Ê(Ž–4Jo¶s§Íå}áðØÕr¤Ê1¢VmT$À‘ë ÇìšëÔá¹PÜÑçaбäÊe¶ƒE›Wºc‘ù¶hphø~ @úºôd“þ+Ú\=µ{Ú4ä(¥'ß›À €„ûe’9°Ú `{¨ô„ ™Ð½Át cõecøQ8Ý++Ô•ÿñ06±¼$(‹¡ ,#ÂÜôÅ`,5!b˜ ( ‰ Ó«×&+'SÊE½´‘ŠjYYV ™Œõ ¬<*b`&Dg>ωøº/gXŽ–ÃØµý4Èæa\s¢}Œm ó£¢ùŒ¼¡ô‘jÛ¸@µtÄŸÚ=G>Sy;вpÑO öh4åE(÷â¢|€m²Ø]!Oj¼÷…fƒ•EúD^éX^X÷DÃûI át¹™'è’¼² 77L¯åh¾5ñ”EÊ ¥ŸsR¹kŸ‚ƒò|nè«›m'Ò9Ò‘>A|5œªVB#èK[PLd[^°áªyèBž n~Äúä¾4it¡Æ©¤ƒ3°Ù‡Íz2!+*Ùü¶v›æi†$ÌΖ(ãuB¡ɆY< ,Ú“•4.ŒB5È…Œ06†å7ÕCøQ° l¨ÜjdaïÂÎ8díî³àt+ êö0KŠùí9Ýü¢&Ð>eq‹Áš>o¼­1K¤û»®öXö)z›Bå{q¼ êzÎðalOjÚ‹µ°q¦AÕõÑH )"ÿ?íž"7‘P-\ŸU±¼ç½VÕžÛÑYÒÕ'G¯ÿ<¡É´47æDÄQ¼ƒÃ˜h\ÏÓ‚×÷-Ä+[v-íépŽ~® ëëÂÄ Ti…Ðx†¿­~ÓküGÞØ¡Ý¡P8¡e¯ —µÔ6ͱ± •I?Ë>¯Û½Ìi rg¢Pº ˆ¡¡=8pÈ'´Ï±*ö#f`+¬±S¡QÏ…l«'%C -GUç!Ÿ¡ŽX®ì'DÝà2¾ëŠ &[…fK°ÕB êÊs³¢°É|jÁ³@0pSþ[Ê3ÜC$EŸK†ÖŠÜEôä}«°ë¢ˆ”ÎÀ!~Ž RUz[JŠš×‚ð…Ö¨e’LØÈi¨ª¼'6ô‡|à©Ýkx«Cˆc"Lw$ks0 ˆåù&TœE´8Jn™ëÄÚ0´|ÁB­ŠC%ß2Ž’i$5^Ôk% *°ú@Ö[-™›(°Ò&´$21XbÍ"z]FC±‡ãXtþñÈÑáÙ"çé[”Q÷½s0Q?Põc ê *}/ õÍÄã–4ÑeLX¿k;¸Ëhæ|ñÐ &äœs£iÖ^'£€ÇØ9$?o÷9’Ø­)?LѾ_ïÚ-zÃ7Eï÷ªÝ xƶº†é}ÎdQŠo-4[Ál{-1䪲£Ë$Š~³ð]†w€#™¯å¨ Ýų›y‰ÆìÀ¢£Ô)!_£LþB·:cÕ˜˜„l¸$ðÀÚ†MMØÚdè…bzÄiªrD—屿¸UéÏ‚«« ÃTÞ<ж&é6½~1wû¨U×ÑÎn‘¥s;ˆ%?ÙÔRBǽ ò V>k÷)< 9SS;ªnöþ<ÃiØQt‹“%3[ÉÇŠjZYà…µá©ÕÁZÕn‡ã.‡¼Ñɸ¡ž¶¤ÌçT`?ŸÑå$®Ö.ïÚù«;‹uJÈÄiÉt˜„sÐ÷"è]+°I½aËö›úÏ•(¼ƒJ­K1^±q+ÓSÒ#ÙGan_¶{)£ASow¿¾L\7’­m¸ª [ž±pi1œuîúêON¸>Âf=˜®þ.¶äQ‘5ãáÞlLߨ#ä †ŸrçE;5šzΑŸÒ1ÆI Ó¼þ?^ð_´3-©d˜§gmÆ?=d7èNƒ]ãfó˜÷ž†a;S¯t÷í; xN%Û÷J4½mÎÓ®ãq*ìÑ™G\mJ²V…}Àëv/"â~˜‚ˆ‚‹Š@½ñq.ÜÑ5Ùvy¨´>½·B!¶ˆ¦¼ä‘å5¯‰vŽ ´(ÚYtu°¼D‰]20ÔOžÅK¥²õç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF KIDATxÚì\펹 ¬ò­8〼ÿ#ùYb\àî|±*?Z"‹”z½ ÀÓ€=;3Ýj‰’Èb±z(IxãqlÉ_ ßìßxúòåËë[>Œúcÿï“þ?éß§¹Q¾øcÝèÃõ"\ñFÑy_ ëUóæ—§´NòkõqjÿÈÿ’êgºif}!».û|síl\7íÞõY­³jR±¤ý­vÑvýá\Oˆá©Ž·©êwÃI6ê}X¯ÜæÍm\×J[:M²÷[Ö—›™¨ë³‚Ä}ï·Õßüàgð>an Î I@ÊïÀ9xqþ @¼Î[£â|¡õ$>cœG²s8Û„í­Ï®Ó‹‚f8M<{ ^ß„e9ÂØøœ7£\ó4®u² sŒ´±Eÿ£…´‰ Ëv«ïá gßHp¶ «i‡X4ó¼y ‹WµÅÄË1³Ã×}˜ó³úµæP¶¸5çgÙÇçuõSËâÓækÜk.!œf»ÚËó®vk&Ï[ëlÍÿšKN­9ZëÕçÄ×ë²!Þa«iV„ù:ÿñiíÅ‚²µb…Û¡û‚¹ã×{<£`K{ËC±vwÑçŶÂ_mÃüà~dA1ÿ¿&hìAöF.FÍktküN0ã´ êZRƒ?¶ lSh`}:vl÷ÕõíF%Ac‡Z£ vp8ÂÐd&—Ì~‘ª”Ñ-Âu8º™Í6Ø´#¿Ë67‹O9U›éµ†ÒF8pNÒ¸{•¬ÉZR  ËÝYô5¶úàÉ7 <]ЊźÈBrÀ¶BÍ›G@˜è‚a©žM袈ýWHÒL/ ±ºÂ¾”îK!gûtŒ%‹LÈp"\LÞÁ9Šfì§6,83]^zÔ C@[¨Wßó=-šp^›=ÀÙ ËÆsLáï×µv¿-“ì\—=mˆ&™s쑘 i0ÖM"Ùó`pK±F®)av†5$d²5D‹^×µè×Á¸PÅÛluwNYÇúé x¡C.£Fgf»ªé0Ý ²ÜàŠÑ‚ #ZBè©w#œR Âê´aY ÚÏ´ù²W²³»©3©p`AÍ.Vc; íP=×zƒ­î"M©kô€ë5õ¤jÌ0"dN>¯ýZ_@éY¥ÖÍ1’oP÷þ f ·ÇÈ;j9¤âDâŽÃY!YDÉc,v@¨^xøú½>-:Uè^qvDH¥g–µ‹e8ó ñÍ® âŒe•$Æ@…Òù~ì$NPÍ‘OjE½(rÙ=Î2°!G,+"¸1Fí§Ž¤†:Ñßj«ÛœF…ˆ­§R /·Ü2.mØ<<†Z®Pêd­. lQb£­—×2:68Ôâ«cÛž‹xíAbMf±Ñj4ÚØnŸ3nÌæ·”sxX£ÌÕ¨Yªç;”è6^;mqÑ£¼ÑÀ´(›7k3r–Çb¨¢¥sVã)­ 4£«÷_5ªI)g’ެe¡3³‹4BF®–Ûô\ü-¶º4ºKöÀ-˜1vÊ®•ZÇlqórË»·L D€Qï锯T)FYU;ÿòrÙ:å9´'ÂC/|•ŽuýæÝ# LÚZ£ší9ÁkÔí˜ï5¢ï=â;\âÍèmT¶F%FdíôÊÐF,P‡Â£O†Î):BØ–PûßsÂ倜õ£äðÊ(’§Ž¦ór¨Þg´„;=~ö4]ŠÇFMòTÆŽó‡e5"âí…?sLjEN•éodHåÔ:u5„mX7œÝ½_c/*ëÌξÖV÷ì™Ëh–—ñß9mâà}L]¥^KQ|¾ôCêº4 jEçf"n|/£R…Æâÿ±G—¹™º‚-mAêáêÆa‰L/“Ñp·Ø¡Rψ¬°¢)ÏÂÓBhuvÒDlFY‡Ô¯ÕSؤQñ«‡g¥]–ÚYQ‹®^o³BíVhñ¨ï=TYC”1y4d¡³DçŶº'j Í•©l#Â۲т]æãò—œ±J?w©P ëµéØÆ÷­{Sž2É®—¢\e4ÄP KÔδ¬Ó ê'ô.×FÍœ‡‘éëê§#N»Œ‘j‰uÝe‰ƒibÈF¬Ýù¶JTR¸îÄ|‡yjpSEOˆ"òÜe4ÜèáBŸ ²(æ½"´Ð’ãwØê\§1Mˆ(= ¤B8=~—Ñ(ؘ;ŒYx$e4óŸ¼Îåm\FRD¦æ—§£GR¾FF³úŠp(2·)§eRD“j¤Z÷FFãUž`znd4è²gñ<7èJ‚Α®ñZÝ%æ—-Ü%.(’ª^s2Ñ&šÌ‰æYe4%Žnu)ÞËhÔSoº¾ÑV/—Ñèà}T¹d‰:Òu:>Ê¡&WOÔt#:KoÊÙÃôStp8÷}M†mñú £qy#%ZΨ]DÈMúãkuoE¦p«Ò½HîÒÇÛÙÅÙlk[þÁc«¦`_GÀ>}:=ŵ7p\ŸšQy§È*òMôZ[=“ÓÔ-ª"ÝL\r[²]þMÂ……re¥Õ3*v7W¶žJд˜•¿b7^) %Ç_˜_¼²hÂZ_Ir…Åè´Z¹&Úó!²RC\ZÙ³ÌÇê3" –³ÄFòy-Å£HDÒ}8º`+É&×mŠGÀV_Ián}–¨ˆSÑî‰:÷¦~-Bà¬ÕÍ~²Âäõ(Кø·Úêe2í2éì§r`µ€µ-Öîj^$£aS p¯B÷dõNFc&`«yQïN_Ø:D f€]˦ÊóuM‡žÏÉhƒ“ª…JlI½Ò—ƒŒ†µìô"šŒ72šð«KFSåXw2d4=Bo “ge4x»­Þ+£ÙŸMMW Ï<Ö`†úÜ…×­¦™:ªu_$£A‘åÁ¨¹ öŽ–÷lÂQö¼FÛ‹Už?WDôæ^aÏ)Ï"hÇÄ–(µX2níCRR>ª>݈…”!ù=ò1c±éùTmRªæèŠUÄš„æš=G¸¾^†á´iUxoÁŸœôüNÎx™Œª©-Ö²Ù˜²ùX{{0V‡‹Çíßi«gršŠõ÷ÇB)ÕŠÁ4vHQm/uä­ˆ|’]³È¹P†k ”’ÝÏ¥’¹SÖý‘VÏEhÏ»8Ä &OmZ¬vc¸ú®@,U*a¥A «ƒô‡“FG…F®ˆ¨ìM<4øhx¨Ï5‡Úa3Óvèª '*œ%ÜÄ‘;l¯ºG4Rkò‡çšæ„U wØêvÓ|þüãq<Žãñ'€cþÞ™»­¸~@ட¬ù4ß|ØìqüàÇ?pýÍ¿ü:_BæýGÑþ|ØìqüàÇ?çžøm¾~ µi¾Ù—@þdÍãx?òñ÷L¶MóGÛ06{H³ý–sÙ4˜'|…ýÆÓãx?ðñú½Á9ãü› ó8 é˜×ÿg€ÛÃ…©77IEND®B`‚libalog-0.4.1/doc/html/api/support/images/nav2_btn_mo.png000066400000000000000000000123141172144577100233140ustar00rootroot00000000000000‰PNG  IHDRÍDJIM pHYs  šœ OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF çIDATxÚì\Ý®œ· ä¤öEúþÓ¼N´5Ò8µ¦É!¥o}ìÈ…EàøìîѧŠ?Ѽ I»råÊ&?ýôÓ_Ìl˜Ùgùï®j®\y”ËQ>™Ùoë3^§¹råYþºæ×õ~˜Ùçë4W®¼Î4ža>­\§¹råYþ,ó'3ûÁÌðÃÕË•+òÞÌÞ©ÃØzqåÊ•¯ë4W®\§¹råp¾xwnüGœòÿÔ”ÿó°|lȯë–o™ôÍ7L†o] ¿]/o\¿]Eß8#¾±¾y´wF3ž\ë'ßÞrW‚±<¯ãáõwØ3ÿƒÑ8ßÂŒ«}þû°±Ðù ÎÚbèÁÀ´­Wížœ†¤ÑhXÞ@pu¼&IüµÁl¸0 ÌvsN£9K±3Õ!@Ã0n„s˜µ¡KQXãÇþÌϬuŽ9Œù<û:u1ûtc÷­Ë<†ÙHc!®§Žì›Ëµ¬¥¯õšÆÕçø¾¯´Q7Ú×B”yÎM]ãøZeü¹‚ÅÙæP4ÿ׆DŽ‘î'A‹®-º#ϱ‡,‹AMÀûë5iÕ3Æ`ìW‹#eN5–®à3!3zGüðŽ<ØPƒá˜O2møMí&tÖµÖ¿fÎôï誴ÏE3*œÑ&û0®HïÓ! îPöÅZà °2Š4`Ï}ãÖÞç<( ÆMŒ¨ë§Ì±%E>f|†Ëº¡TSÔÔn~M°ªM 2œ´>9 \AùiNÐNÚC‰wÒeÌOƒÇz6ösõæ9n®a3j‚ "ž`+-\ÇW¶­B¾Q÷ ñëÚ=ešÚDRuôT£sɧ‡ûžÍO*´ dÛª¥jqÒÈ;tfghYÂbSÙ0)Ѳ¤eT~ÄèÙœÏ¬Â±Ž SÅçqô¹„¬',È—Zö9a0·=<½æ†x·bGµuuœZÖ•d–*¶ ˆ ]2N¦ž@11»Ö^·{YÓ¨^=Æ=Fʃìé©}Aƒáá`òÄrŒYGU13@:VËrèà‘ÍáIÖÙj0 š-è–F2Ûbh ÎÕÁç¹ú%Ø”z2+k X/ºM}42¹‘·Ú”÷I&¤Â‚g©YßM(7j4Ff-<1­ÐÄÑ‘×,ú ðÅ L4.!¾÷èÙ˜5‹k)ÆÜׄðÈ’m!$€‡oã|1êD¢ý Ûïëv¯á™­ Á¶Ð5Rlsp•ä‹ ‡V¼ áˆbÖ3F¼Hµ’ÖµÞ*<2ø„s˜˜*aÍrjj„Òj{•0gÎÚ–Í>ZnèT0kÆÄ”¬Vúat¦’ý*¤ÌÇ£îÖŒœ{nYFÃwÔ`袆rr¦B½Átjª¡Æn˜®x72XFW;–ž<˜JàŽfÃáôÈÈ5èsî–Ya'#Lj’_n÷exÖ˜Ž NíLù@P“¯I¨þ÷X+¼ÄíèSòŸ¤çî”GøÁ U¶zäl=ÖXØ v¸#žPàÈú’;´+*g®{ÿoQxÿÜ£#5 ÃÇ®—ƒþl'Íêz…,Ð}«}òØ—ê–ä\˸j¸[ÉðÖvgxÖtIצ‘_)"âÅ5Ö¶àR¤V¨‡Ü,­C Ì‰%3u0ÙNP &Lõ/HeÁnBP‹‡‘X,¢C·Zu%õ:3΢ð-á–ôkÌ!(}:¹‘°UY6Ÿ'¢ØÆ+Švôêe+.•¯ €ŠÖKmÈ‘û§”5Ì<ÜGæ-ôel²Ž¥Ø û J¢7ñ¯°A²”.Îr*˼'†Àa›^·{ÏØ¬k$cdv(ÓÅzj6AéJ.¥jìLú­¤ït&ܶbÞ—`NK*? ‘}hD§`qaˆØ)Iùšeü5„n­ŒUcb²áPÀw+;–!.'ƒUcR†ËêüÙaRÙL¡ž™”í–!‚mÔÇ|U&R/“¹³`$£ÚÝ{ËZS;Bá!(9t w,pµò¥v_„gÁ‰C'·º•¿ŸÉ3l¦n‡n¶³qÈE°ù”C5=Yàµaçe”FAž9pãÕŽ§ë”,k ‘umh°rP\Y J}R30q`Ï,­3à´`åL¾èó!è‰R#‚Ç^í³ñ£ª>ÜŽÐs)Ú+6nUzJz8û(ÌíËv¯à™<^ég3ÂÆ¨§Šô¬!¨ã8$…T(=“­´9XÎ~cA«ø2?ì,,VËŒÐSid¦ŠÏ¼¸<i ›NaÐȈ$ðܰ*„ÃPôÈE–d¦.a4F’ý@R3! eR%Y…ÔÇ‸ܒHtÙ'”ü•J&šMbqÃN²…%þjŇrðkýÑîdÒ˜B…¬`뇫óL*MúF$~l÷è4&Šë'´Ü•U(Úo>ˆ÷j\`…n˜lc°Üb¸¨ [‹qLj¾÷°í8º0*>œ²c-DóJ‡¬’=dV+y\ϲ¶ÛLºçé$eÉÁª‚…ÏäNH°Fz· ‡hŽZ ¡Z}óŽ*j Qèƒ;yç1¨°³ÝЈzL³¸ÛªÍmPô±ÝÅ͉놳µ“Ë z©3.M†“AãÕôÚ~sÂõ¬wÌz¼Ñ§øXO£óŠI?áe Ê[ßlLß° ˆ¢ø‘Ú„PM½æðç‡L¬jK®èz×Þ<ó_PÖ¸ÃçÈy6SŸ²Žtg]ã¤s›}OÅPj™Nw³”:a}+å=·—ûçxœ7ÊÐ^oLš·cZíQ÷½Ý‹L£¸_Kà–vË54Ÿ÷ԔƴíÌfU6r÷hFo…Bl ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF UIDATxÚì\펹 ¬ò­ÄŽq@Þÿ‘îYȇq±/§Ê–È"¥^¯w €§{vfºÕ%‘ÅbõP’ð8ÇãØŽ?þ `øÃþ§/_¾|kÀ‡Q¬ãÿ}Òÿ'ýû47ÊWk£èÝõ"\ñFÑy_ ëUóæ—§´NòkõqjÿÈÿ’êgºif}!».û|síl\7íÞõY­³jR±¤ý­vÑvýá\Oˆá©Ž·©êwÃI6ê}X¯ÜæÍm\×J[:M²÷[Ö—›™¨ë³‚Ä}o·Õ_ü à/þà'|ÂÜ œ’€”ßsðâü€x·FÅùBëI|Æ8 dçp¶ )Ú[Ÿ]§!Ípšxö¼¾ Ë: r…±ñ9oF3¸æi\ëd-æic‹þG iA—íVßÃξ‘àl"V3Ò±hæyó¯j‹‰—=b>f‡¯û0çgõkÍ¡lqkÎϲÏë꧖ŧÍ׸×\B 9Ívµ—ç]í0ÖLž·ÖÙšÿ5—œ6Zs´Ö«Ï‰¯×eC¼ÁV3Ò¬óuþãÓÚŠekÅþ ·C÷sÆ=®÷:yFÁ–ö4—‡bíxĘa›ÐµªãšÕ®ÖöALPXP² ιÕÆ›ËîÅ-ò¢8¶«×˜Ðþ¿Ìç›ùÍ{Ä §Vû¼Ì=üsUoí[—ujËœv'’Ñnáu¬MÀ6‡³ï?‹õbˆ›_c§õ§´!Ø<Û}î¢Ï‹m…?Û†ù À;|'É‚bþMÐØ‚ì\Œš×è×ø aÆiÔµ¤l ئÐÀútìØ.î«ëÛ ŒJ‚ƵF5@íàp„¡3È4L0 .™ý<"U5(£[„ëpt82›m°iG~—mn1:žr(ª6Ók ¥pàœ¤q;÷*+X ’µ¤@–»³è÷Øê=€'ß0ðtAƒë" ÉÛV5oaF  †e|¤j8 x6¡‹"ö_!YtH3½ ,Äê ûRº/9„œíÓ1–,B2![À‰p1yÿç(š±gœrذàÌtyéQ' m¡^}Ï÷´hÂymnô?f3,Ï1…¿_×Úý¶LNHh°su8\ö´!˜dαGb.¤ÁX7‰d̃Á-Å ¸¦„ÙÖÉÖ-z]×" _#àB¯³ÕÝñ´%TXU›S…f%S% ¤-ÏBRYTz Þ Q¯)~®C8gÛNt_«Ú¯ ÂläÇîÁ;\Qî$œ~¦­Žm³Î€êýèpö¤†“Ñ#ÛýNã9­(áÔ§·jŽzÙE÷D7@'ö Rü¬ñ¾ÞVwÇ»nÕ`–á#ÙàTÞk_ðãDR)_Ûg‚X»C‰ç‚“ö-©õ¢Èe÷8ÈÀ†l±¬ˆàƵŸ:’Fè8D­­ns"¶žJ5¼Ür˸´aóðj¹B©“µº€°E‰¶^^ËèØàüQ‹¯Žm{.ⵉ5™]ÄF«Ñhcg¸}θ1›ßbPÎáa2W£f©žìP¢ÛxQì´ÅEòFÓ¢lFܬÍÈY‹¡Š"”ÎY§´6ÐŒ¬ÞÕ¨&¥œI:²–…ÎÌ.Ò¹ZnÓsñרê>Òè.Ù?ÿµ`ÆØ)»Vj³ÅÍË-ïÞ2F½§S¾R¥eUí@þËËYdë”çО D¼ðU:jÔõ›w40ikF h¶?ä¯Q·c¾×ˆ¾÷ˆïpe4Š7£·QÙ•‘µ7Ò+g@±@ >:§èa[BíÏ —rÖ{Œ’Âó(µÜo½ÿ%[ÝE6xÆRªë›‚•i™ÞXLÚ0½¼£üZæpÞ¯Ð×F9†'d´YvO¯(µE 6¨WŠp0j²HöhÉæ¸×ǼÒV¨âíZ,’3‘ÞóÖÎmµRn)èÉXÌEµ/úUâ žgª@p(d×I9²^a‹v:o²†  +M9iûÍisƒ*hô™Œ^‹­žÍit¢“”jl‘yŸÑ0­ïàåµ +`U&Hî,{†íö°ëÝ&sX=f.PØœSndýÃ@ôæ*UŠr%ø(£Hž:šÎËY zŸÑîôøÙÿÑtu(5ÉSe;Îw–Õˆˆ·þÌ1©9U¦¿‘!•SëÔÕv´ayÜpvwô~½¨¬3;û½¶ºgÏ\F³¼ŒïüÎiïcê*õZŠâó¥R×¥YP+:7 qã{ ”*4ÿ=ºÎÍÔli RW7Kdz™Œ†»Å•zFd…MyžB«³“&b3Ê:¤~­žÂ&rˆ_=<£(íš°„ÐΊZtõz›j·B‹Gµxïù Ê¢ŒÉ£! %:/¶Õ=PKh®Le€pÞ–ì2—¿äŒ Tú¹K…‚PˆX¯MÇ6–¸o݃œò”ItŸÕà*£!†R(X¢Öpþ£eVP?¡w¹6jæ<ŒL_W?pÚeŒTK¬ën,KH‹C6bíηU¢’Âu'æàs8ÌSƒ›*zB ‘ç.£áFú¤ÈhxE1ï¡…–¿ÁVç:ÉhBDéQ Âéñ»ŒFÁÆÜaÌÂ#é,£©˜ÿäu.oã2’"25w¸<=’ò{d4«¯÷"£q˜rZ&E4©Fªuod4^å ¦çFFƒ.ÛqÏsƒ®$èé¯Õ]b~ÙØÂ]â‚"©ê5'm¢Éœh‘UFSâèV—⽌F=õ6¡ë+mõrÞG•»áA–¨#]§ã£jrñDM70¢³ô¦œ=L?ÕH‡sß–ÑdøÐ¯2§‘7R¢åŒÚE„ܤ?¾V÷VT` ·*Ý‹ä.}¼],‘Ͷ¶å<¶jJöuìÓ§ÓS\{Çõ©•wŠ|¡"ßDßk«gršºEU¤›)«BnK6°Ë¿i@¸°P®¬´zFÅî†à ÃÖS š³òWìÆ+%¡äø sã‹WMXë+I®°¶Q+×D{>DVêbˆK+{–ùX}F$ÁröƒØH>¯¥x‰Hº¯Gl#ÙäºÍC±àØê+)Ü­Ïq*Ú=QçÞÔ¯EœµºÙOV˜¼ZÿZ[½LF£]F#ýT¬°¶ÅÚ]Í‹d4l*îU螬ÞÉhÌl5#/êÝéÏà [‡ˆÁ¬°kÙTy¾.£éÐó9`pRµP‰-©×AúrѰ–^$£Q“ÑàFF~uÉhªëNFƒƒŒ¦GèMaò¬Œ¯·Õ[e4û³ £)ðjò™ÇLÂPŸ»PãºÕ4SGµî‹d4(²œçe4{—‡úâÁû6 ªØuƒ]^üsø[h×&œ»@OwEÆC7;Ÿž‘Ñà^FS¨ì*ôÝ®ˆŽCÁÔe4û™ÄPwAê÷ÚêyE@ó‚ʤ‹¨êÞ_›¦Û£©3ÊÅ#0¼O0j®G£‚½£å=Ûƒp”=¯Ñ6‡Áb•çϽ¹WØsʳÚ1±åJ-–L…[ûÁ””ªC7b!eH~|ÌXlz>U›”ª9ºbEU'±&¡¹fÏ®¯—a8mZÞ[Dð''=¿“3^&£jj‹µ,D6¦l>ÖÞL„Õáâqû7ÚꙜ¦bý=DZPJµb0RTÛKy+"Ÿd×,r.”‡áZ¥$B÷s©dî”u¤ÕsÚó.±‚ÉS›«Ý®¾+K•JXiÈê ýaà¤ÑQ¡‘+"ê$;ES >š$êsÍ¡vØÌ´º*É g 7qäÛ«î‘ÅšüṦ9aUè ¶ºÝ4¿üò ÇãxÇãwÿÆü½³p>|xë>áúÉšOóýû‡ÍÇ~üׯÑüÀßæë¿žù_ÿQ´ß6{?øñ¹'~›¯ÐÚ4Ø—@þdÍãx?òñk &Û¦ùÒ6Ì»‡ÍÇ#Òl¿å\6 æ _a¿ñô8Ç|ü†þCoHÊyØæácÃ<ŽÇ|þüù˜×ÿg¸{ùõR‚IEND®B`‚libalog-0.4.1/doc/html/api/support/images/package-spec.png000066400000000000000000000006521172144577100234350ustar00rootroot00000000000000‰PNG  IHDRóÿagAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF;IDATxÚìÁÁ €0°Šé£ gðÆqÛ›­ƒxICCÇn,ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFIDATxÚìœmnÓ@@ßÚn”~¥¤Š3Þ!§@üázœÂ9C¹ Ú¤æÇ®“­ãšñâ÷¤‘#'R¢‘ž&;³Þ@¤&Àp\WÀ;àxÜ,‹Of3DÆL„ôºïÚF£1c¢4{³‰FgD6Ò4Ï\E¤Gšf@œnˆ(ÍžÂ<*ÈSira3QòX›.‘§ÒЩ,­(k`•BDišØË[Ë%qnS')&À$„`ÆDiÁeÈAÃMç4"7M—ˆÃM‘?’Æá¦È_ª47E¤É…q¸)²§4àpSäàJÓ'ËCŠ{Ó%²+M“I“˲–óùüË×»;³&JÓ#Lûw¬æð-…Ȩ ™<%qÙ8^Ï xC<+à-p \Õuý`v{ke´Ò¶5§À)ð"‰ó:‰sM:P±9±fp¯šRÈQKSdAzï!5β*s’‰U T…‘£“¦gÍöq€ ³&vÓÚNÚ$«2eG0Å‘QI“W›¾{ËlÓWeÂk‘ÿ^š\’»»î³êRuÖg–àIEND®B`‚libalog-0.4.1/doc/html/api/support/images/sidebarframe.png000066400000000000000000000255401172144577100235410ustar00rootroot00000000000000‰PNG  IHDRÍŸkGbKGDÿÿÿ ½§“ pHYs  šœtIME×  #3ÀX IDATxÚíÝÁ®$»‘˜a†Ô£…ãÅxáy½­ŸB/cÀ až1ËÊ$#˜yúžfaÃß/´îí{êTee&ÉàÏ`ddfàÿcþüç??ýéOÿqŒñŸÇÿéúçcüeŒñ߯ÿcŒñ?ÇÿkŒñ¯¿™#GŽ1räçc7£Ï_òþבû?_ÿ’ùù½Ìûµ» ®ŸíwýCr½WÖŸ_?Î,?¯Ÿ¹^WÞ|dûÝuÐíx?¿}¿ï¸?cðØ?Êý÷÷ZïëûÔèǙ×yË,Ÿ[ÎN>Þ³œƒ±Ïù}Œûw¯ãÉòÊó\­ÿ¿þwHîÛNJ?õjÜ×7÷÷©ç±\×û;òÙ/ߺ|t=žÑÎEŽãúdÿVåf*×z<î©J½§×9ùmòíŸ?àühW~½"Úeý­áŒÈöÚ|Bÿ†9âxÏòûyÿ<ûgçó{~^ÿyíõ+åeñy‡xi8ãø®ëËžB9Aë×"ʹËl§o_´hÏ6¾~Ç•Ïò™­á7T^rŸ­Ï©ˆãú•ã¾ÏmôkãlPûuçñŒí¼dŸU¯Ý}¨÷q>:år®£Ÿ ú¾ëï/÷T¶ƒ?®C<N¾üyÜ­sÎü1Çú¾#Žö™×=—cÆ‘ñ¹‡Æ3sÄõ…ó¾[V»o‹X£Âç#>¿ßšF^7ÚõúÈ9rÄçí®ãZ½PÄ:ƼOÚõåãzÇõIånÝ×ñúYé¹FƈÈÏwŸïTGªˆ1r^ß뺡f»™æçwFi å<åçà>ß©ŒÎ×\ú>·#LjØ7Þ¼:Ïë?'+Çl·t”·‹Œë|Ô†þ¹™#®£¼ÏKùÜÏ!Ís|®õuhsÝdû‚DÖ]B“¸»„X£@ä3övŸß¸¾÷:£7Ô}Œ±ö}Õæç>Èûâ”»ús.b|Ôó–#2ʨå\yý9Í£eýø|h¼i¯#HmÔùlÆyþæõÞômè,ÃîË cBŽcŒ<~<!Ï¿×^ìì~2_Åüê5/ßûñ¹ç;½~æÛùÏ—î2¿<ù6úæ××´ Úo÷Bf¿F?yMž1H~}>߯ÞëÍÑÞµŸ“ó¿ /ùûäwן(ÆùÏßÿîwñãîyb §µ,±F\=ÌÝåŽ{tª^zÓ¨ãj¬0m·woQ"¨ˆõïk¸ëØJ˜+¼ÚÇ·zþˆç¬ï•;4‹vêW¿¸ƒŒøŒ²çW¸ºãÕcßç#r§û £„CñÚÅŠ/b{”ÚñE™Û=å;ŸQ:ØÇÍÞ~÷îù£œ,£Øuœû>ÙƒÞ åJ(X—2úŒ¾ŽØáØ=dF»Cwàw_¿eD‰ÛblŸu”c¼ÞcEDÑO@ÔsÜËOÎq…C‡hÃëçÇó3fͱ†Æhs¡¸ƒ‰ÞeÕø;륟cæèQ{æq¯ÜPŽïðäèÁ2bŒ™kÈÍu—¹Iïk÷Ç”PaÞŸ’åèæŠÆÌ{»×÷9ºÒ·ÐçõX_æ0møÍg¬P/è£!Œç {Nèc¼¾g¼„fãM€œçï<Ï™ìÛì||ô½{’3DÎgè¶æsíÔÜßwŸÇ_„w¯¡Ó»øêšF>ïÛ̯Cÿ?ÄË{XûÙý¦ø—ù—ü‘õ®(aAħ§­!Dzw/VC¯l×3Æ©ŽÚ0‡¡[‡u‡Eõ=K£ŽŒÞk—˜ãúÑþíök×Îk‚;ö±B‹>©\ïy%ÆÝf¸F<‡†zÎb´›³N”ïã>­T1ê¿Gà×Éx”«¶B–úyy\ƒã6ÏòQ5€ŠÑBæQ…JùÚö{G¥ñÕðí¾VÍ]?›×d>×¹GÇv‡r±¤T–àü¾+F ¿'Fæø‘×|fä,Ö'ÇœY#Åbº®›â¾09›¨˜Ë›Í‘s[¬ü(·ë‹^aÞý³2¿YÁWöyÌjóþÂ{n1tÞÁâç}ó²[óž·­z~ŽÞöï Êf‰ãgµ<ŸÆõ1.Ÿïö9'³\ŒmÆ"ÆZ߈=ù¸¾Ó¶k]bÖNf‡t3LjO 2n•—Íègñxc5þyÛ²[3—ã¨ÁnÎËhÍ:¯½ß;VÐ´ÃØË@]f®ùÉURεв´Þ„å¾éßzüYç­sýóŠÇýIËŽf,;÷9Mq]Ë=:e”óRï~_üÝþ?>áôl®ÏÆ}宋{®{”f•»¬Éeþ#c-,U[˜EI¶éd~~vDZ§Ê3ö|dMЯF|µÌ\ÖíîrKZæúÌûÃÏg]7þ¬ àmÔœcβæ³Íçf])·ñ¸nÒÈÑnÞ‘‡¾‹:÷)“ô»QE¬k¹Ž±¼çç»l¿¡çÖ$õ:V‘÷ÿn]Ú:W_•p™ñÖ‘íèöfíøgmĹÎÍå6\óšû:\ ­ŽÞ·ö¿åYÖ®ŠTÿ¶X7ñë¹LÔ^Ua_±Xks7Š"ÚúJï—qw~­‰³œ¼Qn„¾ü´.p4ïžù¼)ß&™å«e±@yHŠûBæÃxõiÔ, q9¾X$Þ+¯aÒ(&2N]^þ™ñ¥å~å}Ñâœof›Ðg9/§!¾g£V%OîýËÙX¾OÈŽ…Ñc «ÖÎ~¾ó©âW´óë"àœ5¼Í6‰îãB×EÇ<µþ¡ò‹ëû»cJPçGñº‰e”¾2¿œ1¿¼K~çxÏÃËo\ƒWåòÓ—?3!öÄ0¿8‡1¾>üøé‘æÓk¿ˆ¦’¿¸[ò‹“•_ªøíkóöañÔB_ýð«ãû–øë_ÿš?²ÄÄ÷äíuF¾‡|9‘í¿Å3…å%÷¦µˆˆ½ÈØoî£qD £¯¬Ih¶9~ô%þ_U'±gêMtÄ‘at¸‰§®³žÇ"Ëc­)Îó£§™Œ—§öŸ³…:m]¬½"ßïÒrýâÑ=Ö1'ÖyÊüêžÃ ¾òøBD–5¹zûR»ªŸ}@¾~½_ù%ü¸&»ãš¬øû>ü5©Ï—ó]ÎÚ¬ê0ÚÄvOø‹G_“Ûè¢a¹ù}VÖ‚Õˆ5 ßs±yt Ñûç<>%ñX_ŠïÇNÙ¹£Ì²¸x Qn˶ˆYóöj¾T1fÙ®C.ϳ'Ë­e"Ç:ÎãÎ>sÈz­Æ±~V&ÉÑæÇ*@Kɵ@;Žå™ÞP³.™¾~Írî5¹nÈz#ŠcÍ­-f®9Ͼ²)í¿ÿñûo‹€?þññ#/ßõ‰ïrÙ‹‡ì½lÒ¨ u³ªÖOÞ9=%ïèŽûgŒÏoä~¸“÷|åZìÖI²Œ³% ÞʵjÈûÂfi [\d™‹¬F|_Öežêœ¤|í:ÏkËã—4Y Ïu•ó•û¼Æ±’gâgOUûœ×Ú‘\çµ®¨¯&ŽdÊ(ÉÌGVÅÎ%M¥ßö+oCUnÜÈíÎZ`Ôùò™}l-¯Í<‡Ü|Mö•ù\23ÆÌyÝyËÝ­ß‹=Çý50÷êþ,}À6$c§'¬7ÆÈÑ2Vo_Ôð§•Çry_ØÛ&eÙ’pf"/Å{$U\©âó ‡jZúºêsÛ®c¤Øi:g~ÖçÙ;ûŠBÕšenQÉçëêYcƒ•ª¿3)òìAKBj–4’YUü1Š®õ­µàqiò[D³eëGì6t™«=ô0(Jvx®P~߯µÿÏ’ep/Ü‘ADIÂŒ3£DõóHdØQKi1yï|Ke½hå{|F ùÕ|ò·DÀêäª*‰bÙRQÊÞÇʦOsý=î6ð91ó^`ëÊsI¦Û»ïTôÈÒWÅ¡aÛLf_ã¸GÇâôï´•¸nüûDŸ!àõîpéêfW²GMG¹4kÔ…ÜÜ©£¦—dŸ^ýÈuÀeî”Qö¨l¶mxî<µ¼’J6TÞ úe ÁuZ®ÜÕ çÝ8K¾r–í‹k™;㸅PYGÑGÖûNÉ­é÷ÍÝÊùÏž‘u½%æ·îu¿²½•s_[«öþ»"à¿ÿó?_" y-ÍkÍ æZc™Wêx‹Ó׆¢hÖ5®õ‚ȼB‰hyU5çë^Åû±Ýz2¢mv‹rÁ#êâ×µ pøÙ,™Q K2ßÝ@ê”:7X½äì«Ö³å™e?û÷·Ö îŽ;w»núÏÍ%W®n\‹Qãû#Ó{éá+È>öñì6×¢sÍ-Ë1_¬R®dÕs¯ÜäÜ?_£åÜs½ÒÁå‘¿V]s–FŸyåžu¬Œ€9Ž"KNîÕµÍç¶„yø˜÷Ö‡|Ì‘×Âi毋€ÏQIÂ,³Ý9vxµg¿³ F±’ùîa·¦£¬Åº1Û4¨f¢®} 3KT»!D”•þ±wü­Ø=JÆòg˜^¡ÏÊ:(yÍɶ™Ëˆsî˜÷ÑKî5œÕö]ó†õóÂî}8e>8öl^›W¢¬ͺ&öt*ê3_²ßc.ñ²ÖË®dËÇ¢¦ª÷&¡]ç˜÷ ³¥îÌÕÇ¡²†jKuï„Ê5—]ɹÖköèulÏ+òêHâðç{öî(rÔIa–ô¢½áíX7þ¦øwÿ÷ñ£¦edÓ¸£¥™D”Uóë5%‘wG²eR;ƒªô|=ï^5ž%]|µ›;af_ ²P¹âÕ\™#î!w&BñÃ;“ $ͫ̚ó‰ˆ+œŒæãÖÂ]Žf¶beJ÷v7Ô—=Ce>x÷Œû\ôФ-ú•‘1æÎJ®«.P×FѯsoКwªýœ+Lœ÷¶Ž¸^[ëJ;ê£È ×~­CûϺh<Ë4¯‰úŠ4J Ë:µ³ÌcßQ®UTå%ïj™ýmÙrÔ·kP›¯Ž’“8«w*a_޲%b¥Ëœ{1ç’Imñ4jèÜ ¤söxÔ-*ÙR£ÖÖ€’ U`æáíêÞ¡™_.ëüTŒ{ßHÔ82WÈ6ÖößldgßY§³¬ôÖü¥¨ÞõžW°6ó¹ð–冥wh7_1ß×H¹{ÑXªq]Ø–ï‹RÆŒ’é|슬ɦ«>Â2Le‹Ã­Ùë¹hûêoëma6‹ºÍ:÷i% æ˜q¬Ó•õœ¬‚fObžë6W¦ú¶®Ÿz³m†¼UùÎÆ®ó¾×Vðø[¶ŒñcV•;s8‹ÙB¢8óVKÊv™ÔíÌÜÒ0f¬0jŸYõîŽ×[VõØóŸÌ3ݤìveNRöRäñ<êŸ÷!íUí;–¯7G”tö:*¯Ì„½Õà>þ(™ßYzѱæ^¹ÂÎÕñ”¬ˆ;m¿%"žó…¸¶BÖ]ŒeËúuMlís*I¤mïÔÜŠÿ1*ïÅéQlà­¯ó^'*vp©ßÕ×…ðÙ—Ùbgxß[æè;bwè¿ÏmÝÖ|‡¬¹ Ôçpç‘[äɯl ø‡ÿñã> ,i-Ùêbå¶cwÏ>ÇÚ՚ܽAÍÈñQÕ÷Ý¥Xç¶åœ-õ«ßh{ÿøž¸å‘í‘{Íe›°+ÎìϺזάå¼{±±W“ï °×‡Jt?÷çÞëkÓYÖu®mÀjH°mê,‹ws/ðÅxÙµX²–“™mM$ïùA÷h•Yv<Ý7ÛºîsÌuea–kÿé¡ûzTÔ0cI’¬R¢~×cƒYd™K«ÜµLÓ,u!%µvT0WÃÙנͳ²®Aåß°5`õ¬ÑV~—g¶òÜ“²yí _yjsoª+íeÍg6õzÏ9ÊrZ™ÏÔMDͳߊø˜ì­g™G*Y®Uç±÷]ÄuÓ¶”˜Öx÷bmµuuË™¥c¬ûpJ¯™;t½CÄ»d -êÈ«÷-;²¦½Ç{ý¯**ê9ͽoÊǾ •‚²j“eO‡-óܘ=•ážcí(6[Ö\[PÍ^àd¯3eùìhùzŸñõòØ*qýîÝx#Ÿ!aKqúÕ­m³Y]½Ž>Ò».õ5÷¾‰Ø6b™°WlcµÇ»µ¯t•{uoî]·©îcØ7àwgÄŽecßäQ6gÝ‹BYÈŽúeŸèa–ºb»‘ÜëL- ´MàǾ°»´ÎÕã×Å×½%x}V­´¹2!ª²¾wÒ^i&÷¶ë«0IÔ9Ë,bü’-kÔ-aö^%r>b|y$Û®mrkîkR>šv¯)R;; ËÆºÝ)Ýû´æú>Yoì3¡s¥vÌÒéŒ•ãØ²ÞË:× [çv ’sÏïo‹€ú/ÿt‰€1Ž’ž{ÞQSKòÜf¼-¯!±L˜kG5[:÷¾÷yUŽ™×ÂKÝ\ûù^;m£®SDÝ"½RZæe®Ê$zÖ“úb\Ê"æšÏ]þ4^4ñÙs­Ž•ãh gZÍÎù:zø;»l¦Û®5žšR²\wx|Ÿ»]Rf®rﱟ¹×2îú^cèûe3ZîdǬuv-ÙëÞ!R@Í8V±{þ“£K¹×Ùfßî‘GÆt–9LÞ!hÉÕ_“©YRÒ~­XàóÙêTµíÝeŽR×@"«x®hñz]_‰½†Sæ±;}ãVÚµLÏÑ“di†{¢Ÿe?ù¸æÇBÇØÛÛöé¬) {ýbæibvi§Ý9DIé/::ºnmâ\;ºEÉ=‡*»ikgS¥KÌmÏõVG1”Y ¢”°å–³Ö¡»WJ«ø™=©†Èe$nYÎK¾ì½Y³4‚Xs±¾ß¦iõkzVž‰rV)uUõ̺ô¬êŸ/µ¬î"tÇgï­';ü:«{ϲ0z_˜º)²f0ìÇJ´B*ñÞóÌ+)p–¹Ç8 ¿g}\HöC<óbÚMpìf<×·Ö6Š®»ÛBà±¥­ÉìùZZåxØS;—×»Í^@ñmޱ:ŽÑ÷>ÕâÃµÞØ¶j½ÆÛ®ˆ9Žê#ãñ °šÕ%œËzÞ³Ž8cט(›äÆcmq¼T›ª ï‹€1Füèu™Ÿ[UÛ¼¦e)5µŽƒ|­8z®q†*ã±GjœuÄòH¨/Êåuš²4èGö‘Ç79_Eº_Ôz. ·ý±+á½æóøé‡åËù=ÏùlAC¯G&ò½îÚó#kí³Gi××_>GëG­´÷äç·à¨[Âú>Kö<-_ó½ Î73•Çøi¥íãÉh_Õ©:k€½ïÄÎoTY{ã­ ðW gŒgù¤ñ¬.õ¬k2~•ç§üfu±Gm„øî'ÇK…–/ç±çûÿ¼6[D< ->¯ôj™9~ÒƒüäGµ¢ÏÛÙ¯©ZçcBŽsøzgm¨÷Š]¿¾5 _ލnøz½ºß8GÇ;µ X1ú³n7[4]×T£$¶zVo'#ú&¯çöÞè;³w¬5…ºáhòq„¯]åo4©U¿ Wáô¨£ù£ÆÑQ±UaŠ×çíôGæÅ9ëŒtï]Ú­…Ë:VöMusÜó ?¯Ã8¶!·çÏ´”¥³^©u0êÓÝÎAºŸû8Š0þáïþ0Æÿûú3ËŸ¯E@ CÖ´«®E,ëÒW€« 1ÚÃuvQôùr2v½ä;陼ZûœÏ½´rËú°œ¹5ØÖ²òÜm¹k×½-}ÿz}àÏ¥\ASQ÷¼hGõB½±·Ìóãé³îe÷jdÉ®1~I*Í]|cäˆãaÁ¥¦óJš+ ¦eŸ:ÊnÒ’m—oÝDõÉ>·oÞõ–Ûþ©|Gëž©“Í_mü—*!y®,·Q*_ ™¿ääý^[³é2<ž–zT¶™,?âˆ:ÁܯO¾ß…Bžæ¡ “ÑÊÅÖDÁ½eÚ áIDATŸA?ÎE®Zq¦”xjëSQ ZœÏZå)É¥LÔcT¹%c×)ˆº7ÆÃW–V%}þØÇtXнµ¹g]ñ|ÔNÝ×rN¦£Äøý2Yî}ä©ûUZ1øÑv¬¶Åãñ~]b£Û# '>KÔšÞç³¹^¾[ôõš¨²à™‰ð+YÎ?Q pö‹çaþ,}™e~NóÖ“~Õ£¼ö\÷xYå~™c¼>—1’ôöùœ<ã÷³¯Ç÷åsÿòù„Î|SA_Ì1ò'Ú8ß^ûþâã«äÛߟ›ùåóV–<•ojÆ?Ÿ¿=žn÷r¯ïºß¿~Ih4@_JûM Ñ¿(4  ¼oˆD@D@D@ ÑD@D@D@@D@D@D@`¤ˆ€ˆ€ˆD@D@D@h4D@ÿfüþÇï‰ào˜¹À÷ÛLÀß0ÒÀ÷MÀ¯4Dð«Í†~-:#€¿e¸!€_€~"øEˆàßhžCD@D@D" " " ˆà—E|[D„‘(Q×oŠ€1¤bü_#ÆDð+"ÀH@D@D@D@D@D@Dˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " "D@D@D@DD@D@D@DD@D@D@DD@D@D@DD@D@D@ " " Cˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " "0È@D@D@D@@D@D@D" " "Î @D@D@D ˆ" " " ˆ€ˆ€ˆ€0ÒD@D@D@@D@D@D@`¤ˆ€ˆ€ˆD@D@D@h4D@D@D@D@D@D@D@D@D@D@D@D@€ˆ€ˆ€ˆ" " " "€ˆ€ˆ€ˆ" " " "€ˆ€ˆ€ˆ" " " "€ˆ€ˆ€ˆ" " " "€ˆ€ˆ€ˆ" " " @D@D@D @D@D@D@@D@D@D@@D@D@D@@D@D@D" " "0€ˆ€ˆ€ˆ" " " "€ˆ€ˆ€ˆ" " " ƒ D@D@D@8a ˆ€ˆ€ˆ€ " " "@£ˆ€ˆ€ˆD@D@D@h4D@D@D@D@D@D@i" " " ˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " "D@D@D@DD@D@D@DD@D@D@DD@D@D@DD@D@D@ " " "€ˆ€ˆ€ˆ€ " " "€ˆ€ˆ€ˆ€ " " "€ˆ€ˆ€ˆ€ " " "€ˆ€ˆ€ˆ€ " " "€ˆ€ˆ€ˆD@D@D`"" " "Ð@ˆ€ˆ€ˆ€ " " " ˆ€ˆ€ˆ€ " " "0È@D@D@D@@D@D@D" " "ˆ€ˆ€ˆ€ " " "À¹@D@D@D @D@D@DD@D@D@DF€ˆ€ˆ€@D@D@D€F@D@D@D@D@D@D@D@ÿÿcßK©«IEND®B`‚libalog-0.4.1/doc/html/api/support/images/sidebarframebottom.png000066400000000000000000000063531172144577100247670ustar00rootroot00000000000000‰PNG  IHDRÍDJIM pHYs  šœ OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFIDATxÚìœËNÃ0Eo ð_ÍŸ²Alø îiH¼ …’Ä,:n§®DbCrŽ4ŠÚªKGw<Ž\Ìçó € ³\.5›ÍÎ%]KZØóVÒ½¤GI¯’Þ$­%5G,@¤#«Â•rO¤” [)ru ÒüAéivB¤•ivRt¿i6´&¯(’iŒÆªMò‰ƒ4’T…$ZX•VÇr£èÒ$Aò£`H(¶]‡›Cº4q¸ ðg}#g€A8Ü( ‡›àp` n d-éÓªO¤X,ªªêBÒ»•—§Í¥ ÒHµÕʉãÛµ=qJÖ ¦š0’TUÕ™¤gm¹ À‹Ó¦íYÿ 0%¬%«M˜G{¾$Ò|º½Í6i I—,!üÂ/~ ™ï}µ–k£¶„‰âÄÛgž´»fåR§‹íQc•Ê §`%È» Q[Â<»6m%é#3 P”æŠõ†‘Šã(JÓš 1mÞ¬j—.i{v Í5k #F‰4M"NL8=‹)Ó¸ýŒ¼47¬7ŒT ´iiÚÄýÍÚDùPÿ9Íž4w¬1Œ\˜TœÖ%NãJßèr{¥RÒë ¨Ë$ŽÈîz† *mó0¥ÄÉÉ“¾ÝÜ;â.mZ0ÅV-I+Kä ÿÿ?@E¼Âšº8IEND®B`‚libalog-0.4.1/doc/html/api/support/images/subprogram-spec.png000066400000000000000000000010241172144577100242150ustar00rootroot00000000000000‰PNG  IHDRóÿagAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<¦IDATxÚ¤RM(DQ>÷¾1ùi,dc1oÆÂ «ÉjÈ‚[YÍ(? EÖˆ&%d/¦,,„F–¤„3=¢š!¿ÃÌ\ßÕ¥×ôFjN}÷|çÝó¾{î÷Q!„ nµqÑÇòÿ+ÂÌÅY/k挂xX…ò-‘¢•ísð¯‰{Ôi« ~ŒÖhãVåð=DvÚC¢åøŽžP¦²^AãTt¤b:]€\ œ84òŽùX¸#sbÜt—*EGå‘(ÒªäŪQñ¬iA׊¶šö«åò” $›•€í‡¼~Òl¡&@C—ý|¹ð%Ót;¹+6•‰"«Àà–˜o`z‰ƒºQv(¯B§4t/J¸ÝeKŒ1Ÿjßš€8Ëø¤ùSM¬Öí$ïÍ3ÅÅÑÞÅ\.W—¦iÑhT÷xV'æÿÖèÆ/™r³×'ÙÝ’S{41˜7föÖ̾2³/Íì‹ÇÇÇ\÷€ùÌ@“šáº+ˆôUÃ0ÐŒC×Û0@Ä¡×Í—ã=ŽûÂx]7/ @\ ÷øÞÞçad¾ùr|tSk~ÆŠÆ‚h4cÜÐpÍ ¼äKRÑÙo†ÇFp¬oÊÃ`mÙ·y1Ò¶©púXwe¬éëzwî‹õãqìÆÔ1ïP€’E3þ©^[¼<+z;ßÔ9Ž9檠[¾=Œ—_ ƒùÖ̾7³?çâwþg3€aUüa“ ÝÒ®ï#él¼Ç9Θ¯/ÒשÖõž«àP|ºd°JºÌaä³16óL_ áOcdƒFŽyÉ@˜ÚÁ¹Þ~£…çÊÁ°ž±>lçƒø|Ÿ47övbÆKê(Ý>P7Á1öñƒ™"ƒÊh1¶s%§s¥[‹[ZDã7¾~kÞT7Q£ùÒ̾6³?šÙŸ“‡N˜{(K„Ñ•S!™§¯ÐcD±òéLeI‹Ð@óñ’¶Oeà*(½x åRÞá?žµñ IþîHÔ›Ú¼WQô9LcBl p©ÊT!QeJŠÙk¢3²"?šÌµœÝêÑcIsö×{gb‰âðkiûëÔ¦)ŽÆ¡Ü9šB´+âú‘í $ŸmGÇXß¼MZ$ÂhÄp¾Æ#7‚xdõf"‚ExìDç陥H¢W1R£áŽÉ˜Æ.ePQR„”몙 ¢„;B}Å2<4â2<™UšUD—æÁí„isÕ©rl¯©ôN ´&gÜ ²¨ÞZçs»@¦Ü~¦/ŒjÓºpêß–=`õ5ÓOIšësg¤È]öºdÂõûÜìu7*¸¢/ru]æHgˆµ|àOOOCÇH’FÒ>|øð"fLèDxÈ-|ˆ Ft‚ïÑ!Ð:£:\`Wï&¬]R.¡² tÑS€4Aÿe눞ªöIÅ eœÆXªèŽRBÌy \®)l’ Ycâ nhP“o±YÛ`CX[Ü£è-4§Vªn)bÔ+gÆ–kƒïtUÀ)À”,%«{ˆÇDz#/™†Èð^àîSY°åá¼(p,R…b©2ñ8(EjKRy<å*LÛr›!4ESÊ`ñqV€j”·ÉѺñc{î£1òì!²fçÌMyx´FÆ•”¨Û GÀƒšBMbô®µ"§¬-qÛ³¡+¹™'ú@¦i:!?]†Ž&Åð¬g Q¶›©P&ïa×+öÂ(Kæ±°Â,ÂñuQb›ÐMˆÓ ChÅ%qvø9Ï3°þ©\,ØJ…L ,9ì\H‘“×¡È hL%1°WÚɀ޹e5ÍkCBþ*fQt@‘A `1ë#$ÞiçCRñ‘@¸žuŽj(‚mÍRÊÂáå9E›ç~Ï+áÈ 'W°Û]ìØ~„sï1¸B!+·û÷¶@&î6wØCÕœ°¯åÝ< C=Šê”Ö"ŒE ÄãÉÁìœiEqHI ѸŠR¥zet?XðC8 G³MDd £M…3/2·¦’ØÚÏfÄf »*Ó¦¹¹¢Í),Ý ¶tjè !äæm¯Ì”.&JZ>¦í—*åqÍ#@e£Ù°úÙUquiÛaY K&ö]‹æ\ùZJ&(ÒïWx1EWoÌËBÉñ!†D7ÊW‘E,M=Ûâu«ƒ*ÌÕ8)KC»17 Ì$ÁêÄÄçgæ¥ø…²ÿ¦F’ieZóŒÈV&󺇕ê„G!žb†Ú‡vLh#¸7?Ñbš/_‹åÂhU¯«´¦F†6Ûh–¸™ˆZ²ÕÏS£„–< !L°Ï>cÏDeAÃ:ðLœQ{_lÛ;á×ɰ…*ÐøZÍ2Ôí;×äB—»B†5#Gœôviàdnƒ©)À”ÁQ×ä\4˜5Í OÀ2UTôCÉ™V”9'u 8bJ¬Dä ŒžÝõÏ(΀…]îòv)x19¥…p­õZDBÇôÉbOÙºæûÊK»µ ŠÛÉy;´rÓìH—°­G׺ÈëY'ýppDÑ€4‡:ÿާw8™j,ÜRIݤþvŽf"IJoûÁÈTööÍû÷ÿ×ðþOOOO˜ØóýáÛD2™„6H‹~ÓŽ¥ôŠ IW™4:à ð…#/SY‘06íeÐÞ)ë77¥`X9¦MO:™kÀh@u ¼ì^m¶1 ï]c—¦‚ð&ÑSGW´Šh–é‘™°swŠ' 58¸%®‘·Ë8Ø´ÏÅA,M6ÌÇQN‘Byj@ÎÀ»c,V°À2ü–¿þÖ̾1³ïÌì/ãï×ë ñˆ¸VÅ$”çTlGŠ"6IU+6œ%Š´Áæ>õ¨ÄT¿FÛ}„¬l‹Y×ó*ÂklYÌš†é,ÏQ­m/8ti.2-ˆÈ"ߦΠ,aVPŸG*;‡¬ ê;y*´–g¸¡ç‡yrs>(7†Þݨ0=Þ xŽÝ’×gb™wnŒ|;å¦CÈDßßBé® 4µe£tAÏ¢ ¯ˆTƒ-Ъ®~c¯ëwu"F7‹n”Ï&QJŒøŒö3Òû¶i¡¯‰r†$CÉ]Xc2­NýBõ£ÂsuæÆœÈ‘˜èêh{RÅñ(!­ð8×ôL”ÙQ£€ \`üsÃf=Óâmú°©aÂFñÇ-n QlZ9TÀKÑÀ=bí‘ æÕ¡Ûk›kê IÐh «¥UppÈ…Ìm-»³&Žé"´2ù_ôéµÅ®k œòzôBÓ­cºIoYÅsÇCâ] ùŒZ‡½y[>ÄP­ïŽ0Â]Íô¿®e/S'½ÖÎIGs»Ã¹a«ÐQÚ È#ˆy:ã*´½]‹)¢éÜ‹r(›“ÈVma5nÒ: .ÉDÎÕ>tî¬Ô•Ѱ¡œuY²J;Š ¨8&[8~žŠ]7©k¹®’vË2>K˜Û”Ò‘a˜]$h‘x˜`Ìì:™°ü¬ÃБ›`ÁeQÈW6)MEà¸d Õû# ­E¹CtvמNáis¦âÔ9jŒ `¼D¹tåZC88¡¥RI»®Z9øäSEàö'Ʊ9GØÔ•âA;WˆÓf£•=èήì=aÑÈZ!ì6ëM>!_Ás¦¡‰5¼ÍDxÇs¿t‘˜Ï%°m=›Žcø÷÷žï¸oý®¾>}ÆÍXxã»ÏwÌ­»ÿ½×òÆ3íYìäsï˜}Îçê„ÿonü¹‘)7k}’Ý-9µ÷@ƒykfïÌìg3ûÉÌÞ|üøñŸ×=`óf ÉÍpÝDúªa<0ÐŒC×Û0@Ä¡×ùËñÇ}a¼®ó H#—BÄ=¾7?Çad¾ùr|tCk~ƌƄh4cÜÐàxÉ–¤¢£ßßþ1F Ï5”ƒa=c~ØŽ†iàþ>iÓØÛ‰/©OéÖºÓIcï0TF‹Á°+éΕÓXÜÒ"šyãë¸ÆMÕÑq5šŸÌì3û«™ým1y耹÷ˆ2E§Â’yøêgŒ(VîÎT¦´ ´ù¼¤í® \¥»P.åþáY¿ä?‰zSó{E÷À ±(À¥(C…D—³×DgdE~4#j!9»Õ£Ç”|ô×{gb3Å 0¯¥í¯S›¦86‡rçh uÒS×´ƒ|¶c~~›4I„Ñ<‰áü<ŒGnñÈêÍD‹ð؉nÂ3K‘D¯b@£áŽÉÆ2¨()Â@‚{,áºj&C(áŽP_±< qÞ™UšUD—æaÚ ÓâªSåXxЮ1r…šXÁÝ)Ɉ!$Îp Œõt”…MîàvF¾8Í­eŽ ¦S«š–æèz_rwÞM,©HD¤ÀŸdFn8ïÆoÎeàp€a}¡:×” ˜˜iÙñÓÇ ϽIV¬fu ç¢LÐ6œï›Ã»Î ËKRs¾0<°{EŠLùVc¤%ôEô¨ªþ3{âä@#ʉ–‘žŸ´ +ç^ˆ<2œ9Ï1F†pu£\­)áËöøFM3Œ-EKk|¥qµ…Õ=íAº¥ÄÑq}²>rB—“õ·žX˜â×ôh#yp±@º>y,Þ:9 –„ [&ÝbMò^x&Ëà!—ŠÐˆé.;m¨’| OQ­ÌŒ™•áî:dÈÅ©JÐ? ›Ä 4º`80Ö%dŽ‚åÖ5OXâ¹ä{œL¡GÔ”,%v-Ö Ã`b¹égçg{ÒƒB(Xá!3`ÀmVCJ*¬Èš&2’õQVmg4 î =ÊL¥thiÍ·`œ8°œ09=3YyœÙ ”Ù¸'™0”cæ-W'ÿCª¡Ï+´Ã Þ‰ÁÖdÄÝ0‹ê­uL1·kdÂö_Ù¦uát~XÖ€Õ׸Ÿ˜;Ç΀Èz]pý>7kÝÐJ®h‹œ]—±Óẫ|º¥y`f3‚Ó®ÞD<Š€ Sul<¹ç{-è„À‰3´àPk U¸¨×‰dñl 5[%m¡¬ÜÞ¼£¦7GGkóD YAIÎ÷¡Íæ÷‘¿+%ûÔê,ÕÍcÎWÉBb1\òü``ɽ–Òõ»Q¦†‚¢@ÐLvðŒ.O¨²¯kxži=!‡| \Kr³@zQX(bÏ¢¸GrŠQãéqKŠ«Tj厸5ò‰¹eÙ§&Ѝd# 댘¹­s²,õ„ѱñf VnV¢^fCšXò©(U·Îñ±I(õ+3=Pò^W¸žÈu*,Á”‹|À6Snk-3ÿvrJ€Ý¥LaŒ³D¡%f BÔÓx"ØŽl¦úTÞS]¯êÄH òXªÂT!Œ%Û°êçô8PûåGfu&Þs(ÆP~_hn¥R&Ð*9ìœH•‚#½®£Ž¥Æe T¸`'Å€¶UM‰ö¿ÊYPfTØÀb¶ÀÝ´àuØf_H&Žº<¨i\Aá. ´?¢¹ >Ý¥ÁƒM¬¯0C¯ÝÂb›änWܤˆ7ôdwo Éy7_]`OUÓ£eö°%Ó©˜t)ÁTæ¬-¬ÀBz fWĨž’Ä„>.´ê˜¢l®!8Ë„ 3ä6!ptxí ÕAæœFªÑÑšÂHÓÙÖ­ryÌ$ˆy R¹˜‰ecÓ\Ч[Á–N !¤¸yÛë#WJ%-îA;æå`¤y€¥ͦªŸ]W—¶}, uÉT}_`d1$hÒ™€;î$1…0˜Þ˜=—…èK‰º>«òUfKSFŸy9³¤J†1¹³rBÆF)³'I°:1ñù¹r’Ì@«ÿHyÛÒÊ´âŒ@+J“@ÊÂ~Ý]F3 o` ƒ–úж֦u˜ä@´#qŒHI.8½z]HG¡Q¦¡Í6š%n&¢–'¯ÜÆ&,EÀÄ&ÚgSS²Z¨,YkGž‰Ó!jï‹m`~õ ¹G›.«Aãke¨Ûç3Œ¾ÄT Ä~Ù“l‘#Nz»4p2·ÁÔ)À„`ެkr.Šp{¦LX f^ª¢,L’ç@€:×X ‘K=ÈÊM’ ¤0R{h1,xÑ–l ®5_‹H89}r¡ØZW¼¯•ci×Á!·Aq;·óPö@nš¥3…»|tÍ‹f>+ìÛÞEÒêø»¢8gÁ,¦Km©@7É¿g£i˜XÖm H¥ažŽ5šäa„E€¶ sƒ+}]¿\˜ 5:%µ“¢&± ²´V5·Ø8¹‚ûgíBds1¥ÿRI]‚›úQMH”,-ù®¬ÔõÄ]Kq“Q„´´u£DtD^‰Úà” [ÄÁÙÝÅfl!³Ô¬–þAMhëW¦äFM’…z_>¬u·MÞ½§œ¹ÁBÈ¥{U^ƒE™Ù`T ”¼GJ„`©nÖcµirçõ sfÚkÆÕïÒŽÙ¹nžPvªí‡aÞWÄjè@ÿ(¬a]¿;Å< va™ª_"EtñQÒx‡æ€‹Æ`о,€ŽØÉ“™È0ᆧaíÑD82uÐÚé|'{Vé:J>vƒM ËBôKÑö%%/ÉBÇnÞÁhBv§âv6àdŒwÓ;-ï芛`ɲQН´]KÉRû´P½ß9Ò°$EÈIŸwמváis¦òÔ u‰¶ENX¬ß_Hɶ–’v]µÔÜ&ÛçÎë×.ŠWæ¦>ãƒ"rßm°q¥pÚ,´Vº½+»FOX4²V »E½É'Dã+xF¹7 Òø #ŽW»Hø¹MI_¡yª –-éyŒ"[ºê½± ‰u{mª»F÷ôô¢uȦY*úø¢…aõ­^ÍnfÍEQêKhƒ†ˆ ·aiûࢌPh\Ú8¥ÂËvw&?ÚmKk;YO{Ï ïyý’kÎ××·’Å××£òþózÉ=¿–,Z£q<øÉâ<´37pß{w ä3®å+ßï{ËϾÃõy[’§?-mº[É^ªœßòšÿ×gýßã)š¼³Ïû¡}ÿ?ü1¾ã{ôç¿J ÊÜ„IEND®B`‚libalog-0.4.1/doc/html/api/support/images/treechildren_bg.png000066400000000000000000000003051172144577100242250ustar00rootroot00000000000000‰PNG  IHDRÞ’Ž% pHYs  šœtIME× M˜DrtEXtCommentCreated with The GIMPïd%n;IDAT×=Å¡ €@Áyƒ:ú¡gú!9 üV̬ؾϽ÷“ ¼å·RRTboíÀƒ ÷ra )}žIEND®B`‚libalog-0.4.1/doc/html/api/support/images/treechildren_bg_bottom.png000066400000000000000000000004551172144577100256170ustar00rootroot00000000000000‰PNG  IHDRËm8bKGDùC» pHYs  šœtIME× & ÛN“tEXtCommentCreated with The GIMPïd%n‘IDAT(ÏÏ=n1Ð7°ˆE¤ ZîÃ9H[C“hIvM‘!r‡?i<çXa‡=Ù·Ã0œ ‰ÿ³D…áØ÷'ÜqÅ-Ðaƒ|f_'Ü’_ÜpÁ½Ë'Lxà;/=rQK~0&\jp¬°eVK¾›0× Ì .²ZÁ9ÒUÐ ŽªZ2æìèÍЪ¬ç DT0µ+ óIEND®B`‚libalog-0.4.1/doc/html/api/support/images/type-spec.png000066400000000000000000000007431172144577100230240ustar00rootroot00000000000000‰PNG  IHDRóÿagAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<uIDATxÚb` üÿÿŸ‰BÀ¥˜ŠqúˆAéÿ´o¸•Ì+(: e_>ºmÛkvYFK©êó%÷n9ÆÂʦ…M÷¯W·‡¨Åƒ˜0€Âæ‚ÿÏn_üzãÆÅ2Q%Ý-˜õïÛÝc»ê¡^øÍ06‡Ïô3ËX9yPlÿðºm{Mù_,€Lþuóô¾ªçŸ¿}{þå?ûøùáÉùu}@¹ßؼƈEŒ]®fG;3P!ˆóûÕýh†UÅ{888–¹.P5gØõöíÛï±EÙï——u¿ýöãÅÛÏŸ>é ßÔœWºsçÈB! ~Ä‚Èш þý<¼èÍOƒ€J†ooAî ·«¨¨Ì„ª ö—`âLÐpc fPù4 6zá,®T÷šâþA5ƒlNÚš¤+ ^PbÀ“lÑ(ÐÒ€ ~Ä{€†­;—”Šs#@€”›E‘ÿ âIEND®B`‚libalog-0.4.1/doc/html/api/support/images/variable-spec.png000066400000000000000000000006271172144577100236310ustar00rootroot00000000000000‰PNG  IHDRóÿagAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<)IDATxÚbüÿÿ?%€d###ÑÐ-db ° sòrrT³mÚòôÙ³Âuë×YLЀÜìì\ U÷#cŠ„¸øo ³ˆã2„ IC8º$33sbÇçUd‰ïXä@]IØ€?þÌD—üöíÛBR¢‘)5%%Œ•5ÈæúöýûÆù ̹B^^žƒ••u9íÕwˆ]oß¾ý9^¡Îåb~(扩¨¨Tñ]" -Ä»X l9ZBb„b˜×@¦ÿ*vÒ»xT¼l;–Àk ÿ‰Ý¹sgBR÷NUUÕ˜è”t(€Ó€§ˆA¶+Á y†ZÐ çïza5<(Δ€Ÿ*ƒå­ Y§IEND®B`‚libalog-0.4.1/doc/html/api/support/tags.css000066400000000000000000000012761172144577100206120ustar00rootroot00000000000000div.summary:before { content: "Summary: "; font-weight: bold; } div.summary { border-bottom: 1px dotted #e0e0e0; } div.description:before { content: "Description: "; font-weight: bold; } div.description { font-style: italic; border-bottom: 1px dotted #e0e0e0; } div.parameter * { font-style: italic; color: #444; display: inline; } div.exception:before { content: "Exception: "; font-weight: bold; } div.seealso:before { content: "See also: "; font-weight: bold; } div.seealso { font-style: italic; } div.subprograms div.comment div.code { font-family: monospace; white-space: pre-wrap; } div.subprograms div.comment div.code p { padding: 0; } libalog-0.4.1/doc/html/api/toc.html000066400000000000000000000152251172144577100171000ustar00rootroot00000000000000 Table of Contents
Packages and source files (A):
Alog (package) at alog.ads:27:9
Alog.Active_Logger (package) at alog-active_logger.ads:34:14
Alog.Controlled_Map (package) at alog-controlled_map.ads:37:14
Alog.Exceptions (package) at alog-exceptions.ads:28:14
Alog.Facilities (package) at alog-facilities.ads:32:14
Alog.Facilities.File_Descriptor (package) at alog-facilities-file_descriptor.ads:27:25
Alog.Facilities.Pgsql (package) at alog-facilities-pgsql.ads:26:25
Alog.Facilities.SMTP (package) at alog-facilities-smtp.ads:30:25
Alog.Facilities.Syslog (package) at alog-facilities-syslog.ads:23:25
Alog.Facilities.XMPP (package) at alog-facilities-xmpp.ads:25:25
Alog.Helpers (package) at alog-helpers.ads:28:14
Alog.Log_Request (package) at alog-log_request.ads:28:14
Alog.Logger (package) at alog-logger.ads:34:14
Alog.Maps (package) at alog-maps.ads:27:14
Alog.Policy_DB (package) at alog-policy_db.ads:27:14
Alog.Protected_Containers (package) at alog-protected_containers.ads:29:14
Alog.Tasked_Logger (package) at alog-tasked_logger.ads:32:14
Alog.Transforms (package) at alog-transforms.ads:26:14
Alog.Transforms.Casing (package) at alog-transforms-casing.ads:24:25
Alog.Version (package) at alog-version.ads:1:14
libalog-0.4.1/doc/html/api/tree.html000066400000000000000000000074331172144577100172540ustar00rootroot00000000000000 Global Class Inheritance Trees
Global Class Inheritance Trees

Alog.Active_Logger.Instance (at alog-active_logger.ads:36:9)

Alog.Facilities.Instance (at alog-facilities.ads:37:9)

Alog.Facilities.File_Descriptor.Instance (at alog-facilities-file_descriptor.ads:29:9)

Alog.Facilities.Pgsql.Instance (at alog-facilities-pgsql.ads:28:9)

Alog.Facilities.SMTP.Instance (at alog-facilities-smtp.ads:32:9)

Alog.Facilities.Syslog.Instance (at alog-facilities-syslog.ads:25:9)

Alog.Facilities.XMPP.Instance (at alog-facilities-xmpp.ads:27:9)

Alog.Log_Request.Instance (at alog-log_request.ads:32:9)

Alog.Logger.Instance (at alog-logger.ads:36:9)

Alog.Maps.Wildcard_Level_Map (at alog-maps.ads:29:9)

Alog.Transforms.Instance (at alog-transforms.ads:30:9)

Alog.Transforms.Casing.Instance (at alog-transforms-casing.ads:28:9)

libalog-0.4.1/doc/index000066400000000000000000000113741172144577100147430ustar00rootroot00000000000000Alog ==== * link:README.html[README] * link:CHANGELOG.html[CHANGELOG] * http://www.codelabs.ch/download[Download] Overview -------- Alog is a stackable logging framework for Ada. It aims to be straight forward to use and easily extendable. It provides support for various logger types, log facilities, loglevel policies and message transformations. image:alog-arch.png[Framework Architecture] Logger ~~~~~~ Logger instances are used to manage an arbitrary number of log facilities and message transformations. Various logger types exist which are suitable for different scenarios: Logger:: This is the basic Alog logger type. This logger is easy to use and good enough for most situations. However, it does not provide thread safety. Tasked Logger:: The Alog tasked logger encapsulates a basic logger instance inside a server task to provide safe concurrent logging. Since calls to this logger are potentially blocking operations, it cannot be used from within a protected action. Active Logger:: The Alog active logger provides task safe concurrent logging from any context. Facility ~~~~~~~~ Another basic entity in the Alog framework is called a Facility. Facilities are log destinations and used to log messages to different backends, e.g. a file or a database. Currently, the framework provides the following log facilities: File_Descriptor:: Writes log messages to file or console. Syslog:: Writes log messages to syslog. SMTP:: Sends log messages by mail. PGSQL:: Writes log messages to a PostgreSQL database. XMPP (experimental):: Sends log messages to a jabber account. Transformation ~~~~~~~~~~~~~~ Transformations are used to modify a log message before it is passed on to a facility. The following message transformations are available: Casing (toUpper / toLower):: Convert a log message to upper/lower case. Policy ~~~~~~ Alog supports source and destination filtering by means of loglevel policies. Refer to the example section for information on how to setup such policies. Examples -------- The examples presented in this section will give an introduction on how to use the Alog framework in your own project. Logger ~~~~~~ The following example uses a basic logger instance to log messages to standard output. Furthermore, a file based facility is attached which writes log messages to a file. [source,ada] --------------------------------------------------------------------- include::../examples/logger_example1.adb[] --------------------------------------------------------------------- The logger will take care about cleaning up all the attached facilities when it goes out of scope. However, you can do this explicitly by calling `Logger.Clear` as well. Facility ~~~~~~~~ The following code sets up a file descriptor based facility to log messages to a file. If the file already exists, it will be overwritten. [source,ada] --------------------------------------------------------------------- include::../examples/facility_example1.adb[] --------------------------------------------------------------------- More features for the different facilities are work in progress, see the API documentation link:api/index.html[here] for details of the possibilities. Policy ~~~~~~ The first policy example uses the policy database of Alog to specify source specific loglevels. It shows how logging policies can be used to filter log messages depending on their source. [source,ada] --------------------------------------------------------------------- include::../examples/policy_example1.adb[] --------------------------------------------------------------------- The second policy example demonstrates the usage of destination filtering. Only log messages with loglevel `Error` or higher are written to the application error logfile. It shows how logging policies can be used to filter log messages depending on the destination (facility name). [source,ada] --------------------------------------------------------------------- include::../examples/policy_example2.adb[] --------------------------------------------------------------------- API documentation ----------------- - You can find the API documentation of Alog link:api/index.html[here]. Browse the source ----------------- - You can browse the Alog source code with gitweb http://git.codelabs.ch/?p=alog.git[here]. Licence ------- -------------------------------------------------------------------------------- Copyright (C) 2008-2011 Reto Buerki Copyright (C) 2008-2011 Adrian-Ken Rueegsegger Alog is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. -------------------------------------------------------------------------------- libalog-0.4.1/doc/page.conf000066400000000000000000000465511172144577100155010ustar00rootroot00000000000000[miscellaneous] outfilesuffix=.html [attributes] basebackend=html basebackend-html= basebackend-xhtml11= [replacements2] # Line break. (?m)^(.*)\s\+$=\1
[replacements] ifdef::asciidoc7compatible[] # Superscripts. \^(.+?)\^=\1 # Subscripts. ~(.+?)~=\1 endif::asciidoc7compatible[] [ruler-blockmacro]
[pagebreak-blockmacro]
[blockdef-pass] asciimath-style=template="asciimathblock",subs=[] latexmath-style=template="latexmathblock",subs=[] [macros] # math macros. # Special characters are escaped in HTML math markup. (?su)[\\]?(?Pasciimath|latexmath):(?P\S*?)\[(?P.*?)(?asciimath|latexmath)::(?P\S*?)(\[(?P.*?)\])$=#[specialcharacters] [asciimath-inlinemacro] `{passtext}` [asciimath-blockmacro]
{title}
`{passtext}`
[asciimathblock]
{title}
`|`
[latexmath-inlinemacro] {passtext} [latexmath-blockmacro]
{title}
{passtext}
[latexmathblock]
{title}
|
[image-inlinemacro] {data-uri%}{alt={target}} {data-uri#}{alt={target}} {link#} [image-blockmacro]
{caption={figure-caption} {counter:figure-number}. }{title}
[unfloat-blockmacro]
[indexterm-inlinemacro] # Index term. {empty} [indexterm2-inlinemacro] # Index term. # Single entry index term that is visible in the primary text flow. {1} [footnote-inlinemacro] # footnote:[].
[{0}]
[footnoteref-inlinemacro] # footnoteref:[], create reference to footnote. {2%}
[{1}]
# footnoteref:[,], create footnote with ID. {2#}
[{2}]
[callout-inlinemacro] ifndef::icons[] <{index}> endif::icons[] ifdef::icons[] ifndef::data-uri[] {index} endif::data-uri[] ifdef::data-uri[] {index} endif::data-uri[] endif::icons[] # Comment line macros. [comment-inlinemacro] {showcomments#}
{passtext}
[comment-blockmacro] {showcomments#}

{passtext}

[literal-inlinemacro] # Inline literal. {passtext} # List tags. [listtags-bulleted] list=
{title?
{title}
}
    |
item=
  • |
  • text=

    |

    [listtags-numbered] # The start attribute is not valid XHTML 1.1 but all browsers support it. list=
    {title?
    {title}
    }
      |
    item=
  • |
  • text=

    |

    [listtags-labeled] list=
    {title?
    {title}
    }
    |
    entry= label= term=
    |
    item=
    |
    text=

    |

    [listtags-horizontal] list=
    {title?
    {title}
    }{labelwidth?}{itemwidth?}|
    label=| term=|
    entry=| item=| text=

    |

    [listtags-qanda] list=
    {title?
    {title}
    }
      |
    entry=
  • |
  • label= term=

    |

    item= text=

    |

    [listtags-callout] ifndef::icons[] list=
    {title?
    {title}
    }
      |
    item=
  • |
  • text=

    |

    endif::icons[] ifdef::icons[] list=
    {title?
    {title}
    }|
    ifndef::data-uri[] item={listindex}| endif::data-uri[] ifdef::data-uri[] item={listindex}| endif::data-uri[] text=| endif::icons[] [listtags-glossary] list=
    {title?
    {title}
    }
    |
    label= entry= term=
    |
    item=
    |
    text=

    |

    [listtags-bibliography] list=
    {title?
    {title}
    }
      |
    item=
  • |
  • text=

    |

    [tags] # Quoted text. emphasis={1?}|{1?} strong={1?}|{1?} monospaced={1?}|{1?} singlequoted={lsquo}{1?}|{1?}{rsquo} doublequoted={ldquo}{1?}|{1?}{rdquo} unquoted={1?}|{1?} superscript={1?}|{1?} subscript={1?}|{1?} ifdef::deprecated-quotes[] # Override with deprecated quote attributes. emphasis={role?}|{role?} strong={role?}|{role?} monospaced={role?}|{role?} singlequoted={role?}{1,2,3?}{amp}#8216;|{amp}#8217;{1,2,3?}{role?} doublequoted={role?}{1,2,3?}{amp}#8220;|{amp}#8221;{1,2,3?}{role?} unquoted={role?}{1,2,3?}|{1,2,3?}{role?} superscript={role?}|{role?} subscript={role?}|{role?} endif::deprecated-quotes[] # Inline macros [http-inlinemacro] {0={name}:{target}} [https-inlinemacro] {0={name}:{target}} [ftp-inlinemacro] {0={name}:{target}} [file-inlinemacro] {0={name}:{target}} [irc-inlinemacro] {0={name}:{target}} [mailto-inlinemacro] {0={target}} [link-inlinemacro] {0={target}} [callto-inlinemacro] {0={target}} # anchor:id[text] [anchor-inlinemacro] # [[id,text]] [anchor2-inlinemacro] # [[[id]]] [anchor3-inlinemacro] [{1}] # xref:id[text] [xref-inlinemacro] {0=[{target}]} # <> [xref2-inlinemacro] {2=[{1}]} # Special word substitution. [emphasizedwords] {words} [monospacedwords] {words} [strongwords] {words} # Paragraph substitution. [paragraph]
    {title?
    {title}
    }

    |

    [admonitionparagraph] template::[admonitionblock] # Delimited blocks. [listingblock]
    {caption=}{title}
    
    |
    
    [literalblock]
    {title}
    
    |
    
    [sidebarblock]
    {title}
    |
    [openblock]
    {title}
    |
    [partintroblock] template::[openblock] [abstractblock] template::[quoteblock] [quoteblock]
    {title}
    |
    {citetitle}{attribution?
    } — {attribution}
    [verseblock]
    {title}
    |
    
    {citetitle}{attribution?
    } — {attribution}
    [exampleblock]
    {caption={example-caption} {counter:example-number}. }{title}
    |
    [admonitionblock]
    {data-uri%}{icons#}{caption} {data-uri#}{icons#}{caption} {icons%}
    {caption}
    {title}
    |
    # Tables. [tabletags-default] colspec= bodyrow=| headdata=| bodydata=| paragraph=

    |

    [tabletags-header] paragraph=

    |

    [tabletags-emphasis] paragraph=

    |

    [tabletags-strong] paragraph=

    |

    [tabletags-monospaced] paragraph=

    |

    [tabletags-verse] bodydata=
    |
    paragraph= [tabletags-literal] bodydata=
    |
    paragraph= [tabletags-asciidoc] bodydata=
    |
    paragraph= [table]
    {colspecs} {headrows#} {headrows} {headrows#} {footrows#} {footrows} {footrows#} {bodyrows}
    {caption={table-caption} {counter:table-number}. }{title}
    #-------------------------------------------------------------------- [floatingtitle] {title} [preamble] # Untitled elements between header and first section title.
    |
    # Document sections. [sect0] {title} | [sect1]
    {numbered?{sectnum} }{title}
    |
    [sect2]
    {numbered?{sectnum} }{title} |
    [sect3]
    {numbered?{sectnum} }{title} |
    [sect4]
    {title} |
    [appendix]
    {numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title}
    |
    [toc]
    {toc-title}
    [header] {title} {title%}{doctitle=} ifdef::linkcss[] ifdef::quirks[] endif::quirks[] ifdef::pygments[] ifdef::toc2[] endif::linkcss[] ifndef::linkcss[] endif::linkcss[] ifndef::disable-javascript[] ifdef::linkcss[] endif::linkcss[] ifndef::linkcss[] endif::linkcss[] endif::disable-javascript[] ifdef::asciimath[] ifdef::linkcss[] endif::linkcss[] ifndef::linkcss[] endif::linkcss[] endif::asciimath[] ifdef::latexmath[] ifdef::linkcss[] endif::linkcss[] ifndef::linkcss[] endif::linkcss[] endif::latexmath[] {docinfo1,docinfo2#}{include:{docdir}/docinfo.html} {docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} template::[docinfo]
    # Article, book header. ifndef::doctype-manpage[]
    endif::doctype-manpage[] # Man page header. ifdef::doctype-manpage[] endif::doctype-manpage[] [footer]
    ifdef::doctype-manpage[] [synopsis] template::[sect1] endif::doctype-manpage[] ifdef::quirks[] include::xhtml11-quirks.conf[] endif::quirks[] libalog-0.4.1/examples/000077500000000000000000000000001172144577100147545ustar00rootroot00000000000000libalog-0.4.1/examples/Makefile000066400000000000000000000016071172144577100164200ustar00rootroot00000000000000# # Copyright (c) 2009, # Reto Buerki, Adrian-Ken Rueegsegger # # This file is part of Alog. # # Alog is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Alog is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with Alog; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1301 USA # all: build_examples build_examples: @gnatmake -p -Palog_examples clean: @rm -rf obj libalog-0.4.1/examples/alog_examples.gpr000066400000000000000000000024471172144577100203150ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with "../alog_base"; with "../alog_common"; project Alog_Examples is for Source_Dirs use ("."); for Object_Dir use "obj"; for Main use ("logger_example1.adb", "facility_example1.adb", "policy_example1.adb", "policy_example2.adb", "syslog_example1.adb"); package Compiler is for Default_Switches ("ada") use Alog_Common.Compiler_Switches; end Compiler; package Builder is for Default_Switches ("ada") use ("-g"); end Builder; end Alog_Examples; libalog-0.4.1/examples/facility_example1.adb000066400000000000000000000013611172144577100210250ustar00rootroot00000000000000with Alog.Log_Request; with Alog.Facilities.File_Descriptor; use Alog; -- Alog file descriptor facility example. procedure Facility_Example1 is Facility : Facilities.File_Descriptor.Instance; begin -- Enable writing of loglevels. Facility.Toggle_Write_Loglevel (State => True); -- Use '/tmp/alog.log' as logfile, overwrite existing file. Facility.Set_Logfile (Path => "/tmp/alog.log", Append => False); -- Let the facility process a log request with loglevel 'Warning'. Facility.Process (Request => Log_Request.Create (Level => Warning, Message => "This is a testmessage from Alog FD facility")); -- Teardown the facility. Facility.Teardown; end Facility_Example1; libalog-0.4.1/examples/logger_example1.adb000066400000000000000000000016261172144577100205040ustar00rootroot00000000000000with Alog.Logger; with Alog.Facilities.File_Descriptor; use Alog; -- Alog logger example. procedure Logger_Example1 is -- Initialize logger instance with default file descriptor facility -- (logs to stdout). Log : Logger.Instance (Init => True); begin -- Write a message with loglevel 'Info' to stdout. Log.Log_Message (Level => Info, Msg => "This is a testmessage from Alog logger"); Attach_FD_Facility : declare FD : constant Facilities.File_Descriptor.Handle := new Facilities.File_Descriptor.Instance; begin FD.Set_Logfile (Path => "/tmp/alog.log"); Log.Attach_Facility (Facility => Facilities.Handle (FD)); -- Log a message to file and stdout. Log.Log_Message (Source => "Example", Level => Warning, Msg => "Another testmessage"); end Attach_FD_Facility; end Logger_Example1; libalog-0.4.1/examples/policy_example1.adb000066400000000000000000000022271172144577100205220ustar00rootroot00000000000000with Alog.Policy_DB; with Alog.Logger; use Alog; -- Alog source loglevel policy example. procedure Policy_Example1 is Log : Logger.Instance (Init => True); begin -- Set default loglevel to 'Info'. Policy_DB.Set_Default_Loglevel (Level => Info); -- Set source specific loglevel for all 'Example' sources to 'Debug'. Policy_DB.Set_Loglevel (Identifier => "Example.*", Level => Debug); -- This message will be logged because it matches a source specific -- loglevel (Example.*). Log.Log_Message (Source => "Example.Source1", Level => Debug, Msg => "This is a testmessage"); -- This message will not be logged because of the configured default 'Info' -- loglevel. There's no configured source loglevel for 'Source2'. Log.Log_Message (Source => "Source2", Level => Debug, Msg => "This will not be logged"); -- No source specified, will not be logged because of the default 'Info' -- loglevel. Log.Log_Message (Level => Debug, Msg => "This will not be logged"); end Policy_Example1; libalog-0.4.1/examples/policy_example2.adb000066400000000000000000000021331172144577100205170ustar00rootroot00000000000000with Alog.Policy_DB; with Alog.Logger; with Alog.Facilities.File_Descriptor; use Alog; -- Alog destination loglevel policy example. procedure Policy_Example2 is Log : Logger.Instance (Init => True); Errors : constant Facilities.File_Descriptor.Handle := new Facilities.File_Descriptor.Instance; begin -- Write all error messages to '/tmp/errors.log'. Errors.Set_Logfile (Path => "/tmp/errors.log"); Errors.Set_Name (Name => "Application_Errors"); Errors.Toggle_Write_Loglevel (State => True); -- Set loglevel policy to 'Error' for destination 'Application_Errors'. Policy_DB.Set_Loglevel (Identifier => "Application_Errors", Level => Error); Log.Attach_Facility (Facility => Facilities.Handle (Errors)); -- This message will appear on stdout, but not in the error logfile. Log.Log_Message (Level => Info, Msg => "This is not an error"); -- This message will also be written to the error logfile. Log.Log_Message (Level => Error, Msg => "This is an error"); end Policy_Example2; libalog-0.4.1/examples/syslog_example1.adb000066400000000000000000000007541172144577100205460ustar00rootroot00000000000000with Alog.Logger; with Alog.Facilities.Syslog; use Alog; -- Alog syslog example. procedure Syslog_Example1 is Log : Logger.Instance (Init => False); Syslog : constant Facilities.Syslog.Handle := new Facilities.Syslog.Instance; begin Log.Attach_Facility (Facility => Facilities.Handle (Syslog)); Syslog.Set_Origin (Value => Facilities.Syslog.LOG_DAEMON); Log.Log_Message (Level => Debug, Msg => "This is a testmessage"); end Syslog_Example1; libalog-0.4.1/gnat/000077500000000000000000000000001172144577100140675ustar00rootroot00000000000000libalog-0.4.1/gnat/alog.gpr000066400000000000000000000024751172144577100155330ustar00rootroot00000000000000-- -- Copyright (c) 2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- -- This project file is designed to help build applications that use -- Alog. Here is an example of how to use this project file: -- -- with "alog"; -- project Example is -- for Object_Dir use "obj"; -- for Exec_Dir use "."; -- for Main use ("example"); -- end Example; project Alog is for Source_Dirs use ("../../include/alog"); for Library_Name use "alog"; for Library_Dir use "../../lib/alog"; for Library_Kind use "dynamic"; for Externally_Built use "true"; end Alog; libalog-0.4.1/libglue/000077500000000000000000000000001172144577100145615ustar00rootroot00000000000000libalog-0.4.1/libglue/glue_syslog.c000066400000000000000000000021621172144577100172620ustar00rootroot00000000000000/* * Copyright (c) 2011, * Reto Buerki, Adrian-Ken Rueegsegger * * This file is part of Alog. * * Alog is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * Alog is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Alog; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * Wrapper for syslog C function which has variable arguments, see GNAT User's * Guide, section 2.10.2, Calling Conventions: * http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Calling-Conventions.html */ #include void syslog_wrapper(int priority, const char *message) { syslog(priority, "%s", message); } libalog-0.4.1/scripts/000077500000000000000000000000001172144577100146255ustar00rootroot00000000000000libalog-0.4.1/scripts/Create_DB_and_User.sql000066400000000000000000000001001172144577100207250ustar00rootroot00000000000000CREATE DATABASE ALOG; CREATE USER alog with password 'foobar'; libalog-0.4.1/scripts/Create_Table.sql000066400000000000000000000002431172144577100176570ustar00rootroot00000000000000DROP TABLE ALOG; CREATE TABLE ALOG ( level character varying(10), timestamp timestamp with time zone, message text ); GRANT ALL PRIVILEGES ON ALOG TO alog; libalog-0.4.1/scripts/initdb.sh000066400000000000000000000001631172144577100164320ustar00rootroot00000000000000#!/bin/bash # # Execute this script as user postgres psql -f Create_DB_and_User.sql psql -f Create_Table.sql alog libalog-0.4.1/src/000077500000000000000000000000001172144577100137255ustar00rootroot00000000000000libalog-0.4.1/src/alog-active_logger.adb000066400000000000000000000164621172144577100201400ustar00rootroot00000000000000-- -- Copyright (c) 2009-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Task_Identification; with Alog.Log_Request; package body Alog.Active_Logger is ------------------------------------------------------------------------- procedure All_Done (Logger : in out Instance) is begin Logger.Message_Queue.All_Done; end All_Done; ------------------------------------------------------------------------- procedure Attach_Default_Facility (Logger : in out Instance) is begin Logger.Backend.Attach_Default_Facility; end Attach_Default_Facility; ------------------------------------------------------------------------- procedure Attach_Facility (Logger : in out Instance; Facility : Facilities.Handle) is begin Logger.Backend.Attach_Facility (Facility); end Attach_Facility; ------------------------------------------------------------------------- procedure Attach_Transform (Logger : in out Instance; Transform : Transforms.Handle) is begin Logger.Backend.Attach_Transform (Transform); end Attach_Transform; ------------------------------------------------------------------------- procedure Clear (Logger : in out Instance) is begin Logger.Backend.Clear; end Clear; ------------------------------------------------------------------------- procedure Detach_Default_Facility (Logger : in out Instance) is begin Logger.Backend.Detach_Default_Facility; end Detach_Default_Facility; ------------------------------------------------------------------------- procedure Detach_Facility (Logger : in out Instance; Name : String) is begin Logger.Backend.Detach_Facility (Name); end Detach_Facility; ------------------------------------------------------------------------- procedure Detach_Transform (Logger : in out Instance; Name : String) is begin Logger.Backend.Detach_Transform (Name); end Detach_Transform; ------------------------------------------------------------------------- function Facility_Count (Logger : Instance) return Natural is F_Count : Natural; begin Logger.Backend.Facility_Count (Count => F_Count); return F_Count; end Facility_Count; ------------------------------------------------------------------------- procedure Finalize (Helper : in out Shutdown_Helper) is begin Helper.Logger.Shutdown; end Finalize; ------------------------------------------------------------------------- function Get_Queue_Length (Logger : Instance) return Natural is begin return Logger.Message_Queue.Length; end Get_Queue_Length; ------------------------------------------------------------------------- function Is_Terminated (Logger : Instance) return Boolean is begin return Logger.Backend'Terminated and then Logger.Logger_Task'Terminated; end Is_Terminated; ------------------------------------------------------------------------- procedure Iterate (Logger : in out Instance; Process : Tasked_Logger.Facility_Update_Handle) is begin Logger.Backend.Iterate (Process); end Iterate; ------------------------------------------------------------------------- procedure Log_Message (Logger : in out Instance; Source : String := ""; Level : Log_Level; Msg : String) is begin Logger.Message_Queue.Put (Element => Log_Request.Create (ID => Ada.Task_Identification.Current_Task, Source => Source, Level => Level, Message => Msg)); end Log_Message; ------------------------------------------------------------------------- procedure Set_Except_Handler (Logger : Instance; Proc : Exceptions.Exception_Handler) is begin Logger.Backend.Set_Except_Handler (Proc => Proc); end Set_Except_Handler; ------------------------------------------------------------------------- procedure Shutdown (Logger : in out Instance; Flush : Boolean := True) is begin if Logger.Is_Terminated then return; end if; if Flush then Logger.Message_Queue.All_Done; end if; Logger.Clear; Logger.Trigger.Shutdown; Logger.Backend.Shutdown; end Shutdown; ------------------------------------------------------------------------- function Transform_Count (Logger : Instance) return Natural is T_Count : Natural; begin Logger.Backend.Transform_Count (Count => T_Count); return T_Count; end Transform_Count; ------------------------------------------------------------------------- procedure Update (Logger : in out Instance; Name : String; Process : Tasked_Logger.Facility_Update_Handle) is begin Logger.Backend.Update (Name => Name, Process => Process); end Update; ------------------------------------------------------------------------- protected body Trigger_Type is ---------------------------------------------------------------------- procedure Shutdown is begin Shutdown_Requested := True; end Shutdown; ---------------------------------------------------------------------- entry Stop when Shutdown_Requested is begin null; end Stop; end Trigger_Type; ------------------------------------------------------------------------- task body Logging_Task is begin select Parent.Trigger.Stop; then abort Log_Loop : loop declare Current_Request : Log_Request.Instance; begin Parent.Message_Queue.Get (Element => Current_Request); Parent.Backend.Log_Message (Source => Current_Request.Get_Source, Level => Current_Request.Get_Log_Level, Msg => Current_Request.Get_Message, Caller => Current_Request.Get_Caller_ID); Parent.Message_Queue.Done; exception when Program_Error => -- The Queue has terminated, let's shutdown. exit Log_Loop; when others => -- Ignore other errors and resume normal operation. null; end; end loop Log_Loop; end select; end Logging_Task; end Alog.Active_Logger; libalog-0.4.1/src/alog-active_logger.ads000066400000000000000000000145051172144577100201550ustar00rootroot00000000000000-- -- Copyright (c) 2009-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Finalization; with Alog.Facilities; with Alog.Transforms; with Alog.Tasked_Logger; with Alog.Protected_Containers; with Alog.Exceptions; -- Active Logger instance. This logger is an active object and implements -- concurrent, asynchronous logging. It provides the same functionality as the -- 'simple' logger. package Alog.Active_Logger is type Instance (Init : Boolean) is tagged limited private; -- Active logger instance. Incoming messages (via Log_Message) are put into -- a request queue. This queue is consumed by a logging task. -- -- By default exceptions which occur during asynchronous processing are -- printed to standard error. Use the Set_Except_Handler procedure to -- register a custom exception handler. type Handle is access all Instance; -- Handle to active logger type. procedure Attach_Facility (Logger : in out Instance; Facility : Facilities.Handle); -- Attach a facility to logger instance. procedure Attach_Default_Facility (Logger : in out Instance); -- Attach default facility with name Default_Facility_Name to logger -- instance. If the default facility is already attached do nothing. procedure Detach_Facility (Logger : in out Instance; Name : String); -- Detach a facility with name 'Name' from logger instance. If the facility -- is not found a Facility_Not_Found exception is raised. procedure Detach_Default_Facility (Logger : in out Instance); -- Detach default facility with name Default_Facility_Name from logger -- instance. If the default facility is not attached do nothing. function Facility_Count (Logger : Instance) return Natural; -- Return number of attached facilites. procedure Update (Logger : in out Instance; Name : String; Process : Tasked_Logger.Facility_Update_Handle); -- Update a specific Facility identified by 'Name'. Call the 'Process' -- procedure to perform the update operation. procedure Iterate (Logger : in out Instance; Process : Tasked_Logger.Facility_Update_Handle); -- Call 'Process' for all attached facilities. procedure Attach_Transform (Logger : in out Instance; Transform : Transforms.Handle); -- Attach a transform to logger instance. procedure Detach_Transform (Logger : in out Instance; Name : String); -- Detach a transform with name 'Name' from logger instance. If the -- transform is not found a Transform_Not_Found exception is raised. function Transform_Count (Logger : Instance) return Natural; -- Return number of attached transforms. procedure Clear (Logger : in out Instance); -- Clear logger instance. Detach and teardown all attached facilities and -- transforms. procedure Log_Message (Logger : in out Instance; Source : String := ""; Level : Log_Level; Msg : String); -- Log the given message asynchronously. The message is put into a log -- request queue which is continuously consumed by a logging task. -- -- This procedure is *safe* to call from protected actions (e.g. from an -- entry call statement or rendezvous). function Get_Queue_Length (Logger : Instance) return Natural; -- Returns the number of currently queued log messages. procedure Shutdown (Logger : in out Instance; Flush : Boolean := True); -- Shutdown the active logger. This procedure must be called in order for -- the logger task to be terminated properly. If 'Flush' is set to True the -- procedure will wait for all queued messages to be logged. function Is_Terminated (Logger : Instance) return Boolean; -- Returns True if active logger shutdown sequence is complete. procedure All_Done (Logger : in out Instance); -- This procedure blocks until all queued logging requests have been -- consumed. procedure Set_Except_Handler (Logger : Instance; Proc : Exceptions.Exception_Handler); -- Set custom exception handler procedure. type Shutdown_Helper (Logger : not null access Instance) is private; -- This helper will call Shutdown on the logger given as discriminant when -- it goes out of scope. This relieves the user from having to excplicitly -- call shutdown on an instance of Alog active logger when wanting to -- terminate. Users must make sure to declare any shutdown helper in a -- smaller scope than the active logger on which the helper supposed to -- work. private task type Logging_Task (Parent : not null access Instance); -- This task takes logging requests from the parent's message queue and -- logs them using the parent's backend logger. protected type Trigger_Type is procedure Shutdown; entry Stop; private Shutdown_Requested : Boolean := False; end Trigger_Type; -- This trigger is used to terminate the logger task by means of ATC. type Instance (Init : Boolean) is tagged limited record Logger_Task : Logging_Task (Parent => Instance'Access); Backend : Tasked_Logger.Instance (Init); Message_Queue : Protected_Containers.Log_Request_List; Trigger : Trigger_Type; end record; type Shutdown_Helper (Logger : not null access Instance) is new Ada.Finalization.Controlled with null record; overriding procedure Finalize (Helper : in out Shutdown_Helper); -- Call shutdown on the active logger instance specified as discriminat. end Alog.Active_Logger; libalog-0.4.1/src/alog-controlled_map.adb000066400000000000000000000076261172144577100203320ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Unchecked_Deallocation; package body Alog.Controlled_Map is procedure Free is new Ada.Unchecked_Deallocation (Object => Element_Type, Name => Element_Handle); -- Free memory occupied by an element. ------------------------------------------------------------------------- procedure Clear (Container : in out Map) is procedure Do_Free (Position : MOEP.Cursor); -- Free the memory of an element. procedure Do_Free (Position : MOEP.Cursor) is Handle : Element_Handle := MOEP.Element (Position => Position); begin Free (X => Handle); end Do_Free; begin Container.Data.Iterate (Do_Free'Access); Container.Data.Clear; end Clear; ------------------------------------------------------------------------- function Contains (Container : Map; Key : Key_Type) return Boolean is begin return Container.Data.Contains (Key => Key); end Contains; ------------------------------------------------------------------------- procedure Delete (Container : in out Map; Key : Key_Type) is Handle : Element_Handle := Container.Data.Element (Key => Key); begin Container.Data.Delete (Key => Key); Free (Handle); end Delete; ------------------------------------------------------------------------- function Element (Container : Map; Key : Key_Type) return Element_Handle is begin return Container.Data.Element (Key => Key); end Element; ------------------------------------------------------------------------- procedure Finalize (Container : in out Map) is begin Container.Clear; end Finalize; ------------------------------------------------------------------------- procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Handle) is begin Container.Data.Insert (Key => Key, New_Item => New_Item); end Insert; ------------------------------------------------------------------------- function Is_Empty (Container : Map) return Boolean is begin return Container.Data.Is_Empty; end Is_Empty; ------------------------------------------------------------------------- procedure Iterate (Container : Map; Process : not null access procedure (Handle : Element_Handle)) is procedure Call_Process (Position : MOEP.Cursor); -- Call 'Process' for each element handle. procedure Call_Process (Position : MOEP.Cursor) is E_Handle : constant Element_Handle := MOEP.Element (Position => Position); begin Process (Handle => E_Handle); end Call_Process; begin Container.Data.Iterate (Process => Call_Process'Access); end Iterate; ------------------------------------------------------------------------- function Length (Container : Map) return Natural is begin return Natural (Container.Data.Length); end Length; end Alog.Controlled_Map; libalog-0.4.1/src/alog-controlled_map.ads000066400000000000000000000063501172144577100203440ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Finalization; with Ada.Containers.Indefinite_Ordered_Maps; generic type Key_Type (<>) is private; type Element_Type (<>) is limited private; type Element_Handle is access Element_Type; with function "<" (Left, Right : Key_Type) return Boolean is <>; -- Controlled variant of a map. The memory of an element pointed to by a -- previously inserted handle is freed upon calling Delete, Clear or during -- finalization of the controlled map. Thus control over objects inserted into -- this map resides with the controlled map. package Alog.Controlled_Map is pragma Preelaborate; type Map is new Ada.Finalization.Limited_Controlled with private; -- A controlled map container. procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Handle); -- Insert a new element handle with 'Key' into the controlled map. function Element (Container : Map; Key : Key_Type) return Element_Handle; -- Return a handle to an element identified by 'Key'. procedure Delete (Container : in out Map; Key : Key_Type); -- Delete the element with key 'Key' from the map. Memory of the element is -- freed. function Contains (Container : Map; Key : Key_Type) return Boolean; -- Returns True if an element with key 'Key' is in the map. function Is_Empty (Container : Map) return Boolean; -- Returns True if the map is empty. procedure Clear (Container : in out Map); -- Remove all elements in the map. Memory of the elements is freed. function Length (Container : Map) return Natural; -- Return the current element count. procedure Iterate (Container : Map; Process : not null access procedure (Handle : Element_Handle)); -- Iterate over all elements in the map and call the 'Process' procedure -- for each handle. private overriding procedure Finalize (Container : in out Map); -- Clean up the the controlled map. This will Free all the memory occupied -- by the elements in the map. package Map_Of_Elements_Package is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => Key_Type, Element_Type => Element_Handle); package MOEP renames Map_Of_Elements_Package; type Map is new Ada.Finalization.Limited_Controlled with record Data : MOEP.Map; end record; end Alog.Controlled_Map; libalog-0.4.1/src/alog-exceptions.ads000066400000000000000000000024441172144577100175230ustar00rootroot00000000000000-- -- Copyright (c) 2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Exceptions; with Ada.Task_Identification; -- Alog exception package. Contains type definitions for Alog specific -- exception handling. package Alog.Exceptions is type Exception_Handler is not null access procedure (Except : Ada.Exceptions.Exception_Occurrence; Caller : Ada.Task_Identification.Task_Id); -- Exception handler callback procedure. Used to register custom callback -- procedures in active and tasked loggers. end Alog.Exceptions; libalog-0.4.1/src/alog-facilities-file_descriptor.adb000066400000000000000000000075411172144577100226130ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Directories; with Ada.Exceptions; package body Alog.Facilities.File_Descriptor is ------------------------------------------------------------------------- procedure Close_Logfile (Facility : in out Instance; Remove : Boolean := False) is use Ada.Text_IO; begin if Facility.Log_File_Ptr /= Standard_Output and Is_Open (File => Facility.Log_File) then if Remove then -- Close and delete. Delete (File => Facility.Log_File); else -- Close only. Close (File => Facility.Log_File); end if; end if; end Close_Logfile; ------------------------------------------------------------------------- function Get_Logfile (Facility : Instance) return Ada.Text_IO.File_Access is begin return Facility.Log_File_Ptr; end Get_Logfile; ------------------------------------------------------------------------- procedure Set_Logfile (Facility : in out Instance; Path : String; Append : Boolean := True) is begin if not Ada.Directories.Exists (Name => Path) then Ada.Text_IO.Create (File => Facility.Log_File, Mode => Ada.Text_IO.Out_File, Name => Path); else declare File_Mode : Ada.Text_IO.File_Mode := Ada.Text_IO.Append_File; begin if not Append then File_Mode := Ada.Text_IO.Out_File; end if; Ada.Text_IO.Open (File => Facility.Log_File, Name => Path, Mode => File_Mode); end; end if; -- Set logfile name and pointer to newly created file. Facility.Log_File_Name := To_Bounded_String (Path); -- Unchecked_Access is needed here since we use a pointer which is -- defined externaly in the Text_IO library. Facility.Log_File_Ptr := Facility.Log_File'Unchecked_Access; exception when E : others => raise Open_File_Error with "Unable to open logfile '" & Path & "': " & Ada.Exceptions.Exception_Message (X => E); end Set_Logfile; ------------------------------------------------------------------------- procedure Teardown (Facility : in out Instance) is begin Facility.Close_Logfile; end Teardown; ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is pragma Unreferenced (Level); use type Ada.Text_IO.File_Access; begin if Facility.Log_File_Ptr = Ada.Text_IO.Standard_Output then Ada.Text_IO.Put_Line (Item => Msg); Ada.Text_IO.Flush; else Ada.Text_IO.Put_Line (File => Facility.Log_File_Ptr.all, Item => Msg); Ada.Text_IO.Flush (File => Facility.Log_File_Ptr.all); end if; end Write; end Alog.Facilities.File_Descriptor; libalog-0.4.1/src/alog-facilities-file_descriptor.ads000066400000000000000000000051131172144577100226250ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Text_IO; -- File_Descriptor facility. Used to log to a console or file. If no file is -- specified by a Set_Logfile()-call, console logging is used. package Alog.Facilities.File_Descriptor is type Instance is new Alog.Facilities.Instance with private; -- File Descriptor based logging facility. type Handle is access all Instance; overriding procedure Teardown (Facility : in out Instance); -- Implementation of Teardown-procedure. procedure Set_Logfile (Facility : in out Instance; Path : String; Append : Boolean := True); -- Set logfile to use. If not set, standard output is used for logging. -- Set Append to False if an existing logfile should be overwritten. function Get_Logfile (Facility : Instance) return Ada.Text_IO.File_Access; -- Get currently used logfile. procedure Close_Logfile (Facility : in out Instance; Remove : Boolean := False); -- Close opened logfile. Open_File_Error : exception; -- This exception is raised if an error occurs while trying to open a -- logfile. private overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of the Write procedure for FD. type Instance is new Alog.Facilities.Instance with record Log_File : aliased Ada.Text_IO.File_Type; -- Logfile used for file based logging. Log_File_Ptr : Ada.Text_IO.File_Access := Ada.Text_IO.Standard_Output; -- Reference to actual log file. Default is Standard_Output. Log_File_Name : BS_Path.Bounded_String := To_Bounded_String ("none"); -- File name of log file. end record; end Alog.Facilities.File_Descriptor; libalog-0.4.1/src/alog-facilities-pgsql.adb000066400000000000000000000203731172144577100205620ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- package body Alog.Facilities.Pgsql is ------------------------------------------------------------------------- procedure Close_Connection (Facility : in out Instance) is begin Facility.Log_Connection.Reset; end Close_Connection; ------------------------------------------------------------------------- function Get_Credentials (Facility : Instance) return String is begin return Facility.Log_Connection.User; end Get_Credentials; ------------------------------------------------------------------------- function Get_DB_Name (Facility : Instance) return String is begin return Facility.Log_Connection.DB_Name; end Get_DB_Name; ------------------------------------------------------------------------- function Get_Host_Name (Facility : Instance) return String is begin return Facility.Log_Connection.Host_Name; end Get_Host_Name; ------------------------------------------------------------------------- function Get_Host_Port (Facility : Instance) return Natural is Port : constant Natural := Facility.Log_Connection.Port; begin return Port; end Get_Host_Port; ------------------------------------------------------------------------- function Get_Level_Column_Name (Facility : Instance) return String is begin return To_String (Facility.Log_Table.Level_Column); end Get_Level_Column_Name; ------------------------------------------------------------------------- function Get_Message_Column_Name (Facility : Instance) return String is begin return To_String (Facility.Log_Table.Message_Column); end Get_Message_Column_Name; ------------------------------------------------------------------------- function Get_Table_Name (Facility : Instance) return String is begin return To_String (Facility.Log_Table.Name); end Get_Table_Name; ------------------------------------------------------------------------- function Get_Timestamp_Column_Name (Facility : Instance) return String is begin return To_String (Facility.Log_Table.Timestamp_Column); end Get_Timestamp_Column_Name; ------------------------------------------------------------------------- function Is_SQL_Trace (Facility : Instance) return Boolean is begin return Facility.Log_Connection.Is_Trace; end Is_SQL_Trace; ------------------------------------------------------------------------- procedure Set_Credentials (Facility : in out Instance; Username : String; Password : String) is begin Facility.Log_Connection.Set_User_Password (User_Name => Username, User_Password => Password); end Set_Credentials; ------------------------------------------------------------------------- procedure Set_DB_Name (Facility : in out Instance; DB_Name : String) is begin Facility.Log_Connection.Set_DB_Name (DB_Name => DB_Name); end Set_DB_Name; ------------------------------------------------------------------------- procedure Set_Host_Address (Facility : in out Instance; Address : String) is begin Facility.Log_Connection.Set_Host_Address (Address); end Set_Host_Address; ------------------------------------------------------------------------- procedure Set_Host_Name (Facility : in out Instance; Hostname : String) is begin Facility.Log_Connection.Set_Host_Name (Hostname); end Set_Host_Name; ------------------------------------------------------------------------- procedure Set_Host_Port (Facility : in out Instance; Port : Natural) is begin Facility.Log_Connection.Set_Port (Port); end Set_Host_Port; ------------------------------------------------------------------------- procedure Set_Level_Column_Name (Facility : in out Instance; Column_Name : String) is begin Facility.Log_Table.Level_Column := To_Unbounded_String (Column_Name); end Set_Level_Column_Name; ------------------------------------------------------------------------- procedure Set_Message_Column_Name (Facility : in out Instance; Column_Name : String) is begin Facility.Log_Table.Message_Column := To_Unbounded_String (Column_Name); end Set_Message_Column_Name; ------------------------------------------------------------------------- procedure Set_SQL_Trace (Facility : in out Instance; Filename : String; Mode : APQ.Trace_Mode_Type) is begin Facility.Trace_Filename := To_Unbounded_String (Filename); Facility.Trace_Mode := Mode; end Set_SQL_Trace; ------------------------------------------------------------------------- procedure Set_Table_Name (Facility : in out Instance; Table_Name : String) is begin Facility.Log_Table.Name := To_Unbounded_String (Table_Name); end Set_Table_Name; ------------------------------------------------------------------------- procedure Set_Timestamp_Column_Name (Facility : in out Instance; Column_Name : String) is begin Facility.Log_Table.Timestamp_Column := To_Unbounded_String (Column_Name); end Set_Timestamp_Column_Name; ------------------------------------------------------------------------- procedure Setup (Facility : in out Instance) is begin Facility.Log_Connection.Set_Trace (False); end Setup; ------------------------------------------------------------------------- procedure Teardown (Facility : in out Instance) is begin -- Close db connection if still open. Facility.Close_Connection; end Teardown; ------------------------------------------------------------------------- procedure Toggle_SQL_Trace (Facility : in out Instance; State : Boolean) is begin Facility.Log_Connection.Set_Trace (Trace_On => State); end Toggle_SQL_Trace; ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is use APQ.PostgreSQL.Client; C : Connection_Type; Q : Query_Type; begin -- Clone connection since Facility is an "in" parameter C.Connect (Same_As => Facility.Log_Connection); -- Open SQL trace if enabled if Facility.Is_SQL_Trace then C.Open_DB_Trace (Filename => To_String (Facility.Trace_Filename), Mode => Facility.Trace_Mode); end if; Q.Prepare (SQL => "INSERT INTO "); Q.Append (SQL => Facility.Get_Table_Name, After => " ("); Q.Append (SQL => Facility.Get_Level_Column_Name, After => ", "); Q.Append (SQL => Facility.Get_Timestamp_Column_Name, After => ", "); Q.Append (SQL => Facility.Get_Message_Column_Name, After => ") "); Q.Append (SQL => "VALUES ("); Q.Append (SQL => "'" & Log_Level'Image (Level) & "'", After => ", "); Q.Append (SQL => "now()", After => ", "); Q.Append (SQL => "'" & Msg &"'", After => ");"); Execute (Query => Q, Connection => C); -- Close SQL trace if enabled if Facility.Is_SQL_Trace then C.Close_DB_Trace; end if; C.Disconnect; end Write; end Alog.Facilities.Pgsql; libalog-0.4.1/src/alog-facilities-pgsql.ads000066400000000000000000000115371172144577100206050ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with APQ.PostgreSQL.Client; -- PGSQL facility. Used to log to a Postgresql database. package Alog.Facilities.Pgsql is type Instance is new Alog.Facilities.Instance with private; -- PGSQL logging facility. type Handle is access all Instance; overriding procedure Setup (Facility : in out Instance); -- Implementation of Setup-procedure. overriding procedure Teardown (Facility : in out Instance); -- Implementation of Teardown-procedure. procedure Set_Host_Name (Facility : in out Instance; Hostname : String); -- Set hostname of database server. function Get_Host_Name (Facility : Instance) return String; -- Get hostname of database server. procedure Set_Host_Address (Facility : in out Instance; Address : String); -- Set ip address of database server. procedure Set_Host_Port (Facility : in out Instance; Port : Natural); -- Set port of database server. function Get_Host_Port (Facility : Instance) return Natural; -- Get port of database server. procedure Set_SQL_Trace (Facility : in out Instance; Filename : String; Mode : APQ.Trace_Mode_Type); -- Set SQL trace parameters. procedure Toggle_SQL_Trace (Facility : in out Instance; State : Boolean); -- Toggles tracing of SQL statements. function Is_SQL_Trace (Facility : Instance) return Boolean; -- Tells whether sql tracing is enabled. procedure Set_DB_Name (Facility : in out Instance; DB_Name : String); -- Set name of database. function Get_DB_Name (Facility : Instance) return String; -- Get name of database. procedure Set_Table_Name (Facility : in out Instance; Table_Name : String); -- Set name of database table. function Get_Table_Name (Facility : Instance) return String; -- Get name of database table. procedure Set_Level_Column_Name (Facility : in out Instance; Column_Name : String); -- Set name of log level column. function Get_Level_Column_Name (Facility : Instance) return String; -- Get name of log level column. procedure Set_Timestamp_Column_Name (Facility : in out Instance; Column_Name : String); -- Set name of log level column. function Get_Timestamp_Column_Name (Facility : Instance) return String; -- Get name of timestamp column. procedure Set_Message_Column_Name (Facility : in out Instance; Column_Name : String); -- Set name of log message column. function Get_Message_Column_Name (Facility : Instance) return String; -- Get name of log message column. procedure Set_Credentials (Facility : in out Instance; Username : String; Password : String); -- Set credentials for the database connection. function Get_Credentials (Facility : Instance) return String; -- Get credentials of database connection. Only the username is returned. procedure Close_Connection (Facility : in out Instance); -- Close open database connection. private overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of the Write procedure for PGSQL. type Log_SQL_Table is tagged record Name : Unbounded_String := To_Unbounded_String ("alog"); Level_Column : Unbounded_String := To_Unbounded_String ("level"); Timestamp_Column : Unbounded_String := To_Unbounded_String ("timestamp"); Message_Column : Unbounded_String := To_Unbounded_String ("message"); end record; -- Holds Table/Column name information. type Instance is new Alog.Facilities.Instance with record Log_Connection : APQ.PostgreSQL.Client.Connection_Type; -- Database connection used for logging. Trace_Filename : Unbounded_String := To_Unbounded_String ("./trace.sql"); Trace_Mode : APQ.Trace_Mode_Type := APQ.Trace_APQ; -- SQL trace parameters Log_Table : Log_SQL_Table; -- Table to insert messages end record; end Alog.Facilities.Pgsql; libalog-0.4.1/src/alog-facilities-smtp.adb000066400000000000000000000103501172144577100204110ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA with AWS.SMTP.Client; package body Alog.Facilities.SMTP is ------------------------------------------------------------------------- function Format_Message (Facility : Instance; Level : Log_Level; Msg : String) return String is Message : constant String := -- Header Facility.Get_Header -- Log-Level & "[" & Log_Level'Image (Level) & "] : " -- Log-Message & Msg & EOL & EOL -- Footer & "Generated: " & Facility.Get_Timestamp & " by " & Facility.Get_Name; begin return Message; end Format_Message; ------------------------------------------------------------------------- function Get_Header (Facility : Instance) return String is begin return To_String (Facility.Header); end Get_Header; ------------------------------------------------------------------------- procedure Set_Header (Facility : in out Instance; Header : String) is begin Facility.Header := To_Unbounded_String (Header); end Set_Header; ------------------------------------------------------------------------- procedure Set_Recipient (Facility : in out Instance; Name : String; EMail : String) is begin Facility.Recipient := (Name => To_Unbounded_String (Name), EMail => To_Unbounded_String (EMail)); Facility.Is_Recipient := True; end Set_Recipient; ------------------------------------------------------------------------- procedure Set_Server (Facility : in out Instance; Name : String) is begin Facility.Server := To_Unbounded_String (Name); Facility.Is_Server := True; end Set_Server; ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is begin -- Raise No_Recipient if no recipient has been set -- by calling Set_Recipient(). if not Facility.Is_Recipient then raise No_Recipient; end if; -- Raise No_Server if no server has been set by calling -- Set_Server(). if not Facility.Is_Server then raise No_Server; end if; declare Status : AWS.SMTP.Status; SMTP_Server : AWS.SMTP.Receiver; begin -- Init receiving server. SMTP_Server := AWS.SMTP.Client.Initialize (To_String (Facility.Server)); -- Try to send message. AWS.SMTP.Client.Send (SMTP_Server, From => AWS.SMTP.E_Mail (To_String (Facility.Sender.Name), To_String (Facility.Sender.EMail)), To => AWS.SMTP.E_Mail (To_String (Facility.Recipient.Name), To_String (Facility.Recipient.EMail)), Subject => To_String (Facility.Subject & " [" & Log_Level'Image (Level) & "]"), Message => Facility.Format_Message (Level => Level, Msg => Msg), Status => Status); -- Raise Delivery_Failure exception if SMTP-Status is not O.K. if not AWS.SMTP.Is_Ok (Status) then raise Delivery_Failed with AWS.SMTP.Status_Message (Status); end if; end; end Write; end Alog.Facilities.SMTP; libalog-0.4.1/src/alog-facilities-smtp.ads000066400000000000000000000075761172144577100204520ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA with Ada.Characters.Latin_1; with AWS; with GNAT.Sockets; -- SMTP-Logging facility. Used to send log-messages to a configurable -- mailserver. AWS must be installed for this facility to work. package Alog.Facilities.SMTP is type Instance is new Alog.Facilities.Instance with private; -- SMTP based logging facility. type Handle is access all Instance; procedure Set_Recipient (Facility : in out Instance; Name : String; EMail : String); -- Set recipient for log-messages. This procedure MUST be called before -- subsequent calls to Write_Message(). procedure Set_Server (Facility : in out Instance; Name : String); -- Set server for log-messages. This procedure MUST be called before -- subsequent calls to Write_Message(). procedure Set_Header (Facility : in out Instance; Header : String); -- Set Message-Header of log-messages. function Get_Header (Facility : Instance) return String; -- Get actual Message-Header of log-messages. -- Exceptions. No_Recipient : exception; -- No recipient specified. Cannot send mail. No_Server : exception; -- No server specified. Cannot send mail. Delivery_Failed : exception; -- Mail could not be delivered. private overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of the Write procedure for SMTP. function Format_Message (Facility : Instance; Level : Log_Level; Msg : String) return String; -- Compose a message from Msg, Header, Loglevel, Timestamp, PID. EOL : constant Character := Ada.Characters.Latin_1.LF; -- EOL used in mail-messages. type Mail_Address is tagged record Name : Unbounded_String; EMail : Unbounded_String; end record; -- Holds Sender / Recipient information. type Instance is new Alog.Facilities.Instance with record Server : Unbounded_String; -- Server to connect when sending log-mails. Is_Server : Boolean := False; -- Indicates whether a server is set. Recipient : Mail_Address; -- Recipient for log-mails. Must be specified before calling -- Write_Message(), else No_Recipient exception is thrown. Is_Recipient : Boolean := False; -- Indicates whether a recipient is set. Sender : Mail_Address := (Name => To_Unbounded_String ("alog"), EMail => To_Unbounded_String ("alog@" & GNAT.Sockets.Host_Name)); -- Notification sender address/name. Subject : Unbounded_String := To_Unbounded_String ("Log-Message"); -- Subject of messages from Alog-System (default: Alog: Log-Message). Header : Unbounded_String := To_Unbounded_String ("This is a message from the Alog-logsystem running on host " & GNAT.Sockets.Host_Name & ":" & EOL & EOL); -- Message-Header. Can be set by calling Set_Header(). end record; end Alog.Facilities.SMTP; libalog-0.4.1/src/alog-facilities-syslog.adb000066400000000000000000000060631172144577100207540ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Interfaces.C.Strings; package body Alog.Facilities.Syslog is package C renames Interfaces.C; type L_Type is mod 2 ** 3; for L_Type'Size use 3; type F_Type is mod 2 ** 8; for F_Type'Size use 8; Level_Map : constant array (Log_Level) of L_Type := (Debug => 7, Info => 6, Notice => 5, Warning => 4, Error => 3, Critical => 2, Alert => 1, Emergency => 0); Facility_Map : constant array (Syslog_Origin) of F_Type := (LOG_KERN => 0, LOG_USER => 8, LOG_MAIL => 16, LOG_DAEMON => 24, LOG_AUTH => 32, LOG_SYSLOG => 40, LOG_LPR => 48, LOG_NEWS => 56, LOG_UUCP => 64, LOG_CRON => 72, LOG_AUTHPRIV => 80, LOG_FTP => 88, LOG_LOCAL0 => 128, LOG_LOCAL1 => 136, LOG_LOCAL2 => 144, LOG_LOCAL3 => 152, LOG_LOCAL4 => 160, LOG_LOCAL5 => 168, LOG_LOCAL6 => 176, LOG_LOCAL7 => 184); ------------------------------------------------------------------------- function Get_Origin (Facility : Instance) return Syslog_Origin is begin return Facility.Origin; end Get_Origin; ------------------------------------------------------------------------- procedure Set_Origin (Facility : in out Instance; Value : Syslog_Origin) is begin Facility.Origin := Value; end Set_Origin; ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is use type C.int; procedure Syslog_Wrapper (Prio : C.int; Msg : C.Strings.chars_ptr); pragma Import (C, Syslog_Wrapper, "syslog_wrapper"); C_Msg : C.Strings.chars_ptr := C.Strings.New_String (Str => Msg); C_Prio : constant C.int := C.int (Level_Map (Level)) + C.int (Facility_Map (Facility.Origin)); begin Syslog_Wrapper (Prio => C_Prio, Msg => C_Msg); C.Strings.Free (C_Msg); end Write; end Alog.Facilities.Syslog; libalog-0.4.1/src/alog-facilities-syslog.ads000066400000000000000000000041051172144577100207700ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- Syslog facility: Used to log to systems syslog. package Alog.Facilities.Syslog is type Instance is new Alog.Facilities.Instance with private; -- Syslog based logging facility. type Handle is access all Instance; type Syslog_Origin is (LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP); -- Syslog facilties. Specifies what type of program is logging the message. procedure Set_Origin (Facility : in out Instance; Value : Syslog_Origin); -- Set origin of syslog message. function Get_Origin (Facility : Instance) return Syslog_Origin; -- Return currently set syslog origin of given facility. private overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of the Write procedure for syslog. type Instance is new Alog.Facilities.Instance with record Origin : Syslog_Origin := LOG_USER; end record; end Alog.Facilities.Syslog; libalog-0.4.1/src/alog-facilities-xmpp.adb000066400000000000000000000074361172144577100204250ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA with Ada.Exceptions; with AWS.Jabber.Client; package body Alog.Facilities.XMPP is ------------------------------------------------------------------------- procedure Set_Recipient (Facility : in out Instance; JID : String) is begin Facility.Recipient := To_Unbounded_String (JID); Facility.Is_Recipient := True; end Set_Recipient; ------------------------------------------------------------------------- procedure Set_Sender (Facility : in out Instance; JID : String; Password : String) is begin Facility.Sender := (JID => To_Unbounded_String (JID), Password => To_Unbounded_String (Password)); Facility.Is_Sender := True; end Set_Sender; ------------------------------------------------------------------------- procedure Set_Server (Facility : in out Instance; Name : String) is begin Facility.Server := To_Unbounded_String (Name); Facility.Is_Server := True; end Set_Server; ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is pragma Unreferenced (Level); use AWS.Jabber; begin -- Raise exception if no sender has been set. if not Facility.Is_Sender then raise No_Sender; end if; -- Raise exception if no recipient has been set. if not Facility.Is_Recipient then raise No_Recipient; end if; -- Raise exception if no server has been set. if not Facility.Is_Server then raise No_Server; end if; declare Client : AWS.Jabber.Client.Account; Recipient : constant AWS.Jabber.Client.Jabber_ID := AWS.Jabber.Client.To_Jabber_ID (Username => "ken", Server => "swissjabber.org"); begin AWS.Jabber.Client.Set_Host (Account => Client, Host => To_String (Facility.Server)); AWS.Jabber.Client.Set_Login_Information (Account => Client, User => To_String (Facility.Sender.JID), Password => To_String (Facility.Sender.Password)); AWS.Jabber.Client.Connect (Account => Client); AWS.Jabber.Client.Send (Account => Client, JID => Recipient, Content => Msg, Subject => To_String (Facility.Subject)); AWS.Jabber.Client.Close (Account => Client); exception when Error : AWS.Jabber.Client.Server_Error => -- Make sure that connecion to server is closed. AWS.Jabber.Client.Close (Account => Client); -- Raise Delivery_Failure exception, something went wrong. raise Delivery_Failed with Ada.Exceptions.Exception_Message (Error); end; end Write; end Alog.Facilities.XMPP; libalog-0.4.1/src/alog-facilities-xmpp.ads000066400000000000000000000070441172144577100204410ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- XMPP-Logging (jabber) facility. -- Send log-messages to a configured Jabber ID via a given jabber server. -- AWS must be installed for this facility to work. package Alog.Facilities.XMPP is type Instance is new Alog.Facilities.Instance with private; -- XMPP based logging facility. type Handle is access all Instance; procedure Set_Sender (Facility : in out Instance; JID : String; Password : String); -- Set sender for log messages. This procedure MUST be called before -- subsequent calls to Write_Message(). procedure Set_Recipient (Facility : in out Instance; JID : String); -- Set recipient for log-messages. This procedure MUST be called before -- subsequent calls to Write_Message(). procedure Set_Server (Facility : in out Instance; Name : String); -- Set server for log-messages. This procedure MUST be called before -- subsequent calls to Write_Message(). No_Sender : exception; -- No sender ID specified. Cannot send message. No_Recipient : exception; -- No recipient specified. Cannot send message. No_Server : exception; -- No server specified. Cannot send message. Recipient_Not_Present : exception; -- Recipient can not be reached through specified server. Delivery_Failed : exception; -- Message could not be delivered. private overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of the Write procedure for XMPP. type Sender_Account is tagged record JID : Unbounded_String; Password : Unbounded_String; end record; -- Holds sender information. type Instance is new Alog.Facilities.Instance with record Sender : Sender_Account := (JID => To_Unbounded_String ("alog@localhost"), Password => To_Unbounded_String ("")); -- Notification sender JID/password. Is_Sender : Boolean := False; -- Indicates whether sender id is set. Server : Unbounded_String; -- Server to connect to. Is_Server : Boolean := False; -- Indicates whether a server is set. Recipient : Unbounded_String; -- Recipient for log-mails. Must be specified before calling -- Write_Message(), else No_Recipient exception is thrown. Is_Recipient : Boolean := False; -- Indicates whether a recipient is set. Subject : Unbounded_String := To_Unbounded_String ("Alog: Log-Message"); -- Subject of messages from Alog-System (default: Alog: Log-Message). end record; end Alog.Facilities.XMPP; libalog-0.4.1/src/alog-facilities.adb000066400000000000000000000133011172144577100174270ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Calendar.Time_Zones; with GNAT.Calendar.Time_IO; with Alog.Policy_DB; package body Alog.Facilities is ------------------------------------------------------------------------- function "=" (Left : Handle; Right : Handle) return Boolean is begin return Left.Get_Name = Right.Get_Name; end "="; ------------------------------------------------------------------------- function Get_Name (Facility : Class) return String is begin return To_String (Facility.Name); end Get_Name; ------------------------------------------------------------------------- function Get_Timestamp (Facility : Class; Time : Ada.Calendar.Time := Ada.Calendar.Clock) return String is use GNAT.Calendar.Time_IO; begin if Facility.Is_UTC_Timestamp then declare use type Ada.Calendar.Time; use Ada.Calendar.Time_Zones; UTC_Offset : constant Time_Offset := UTC_Time_Offset (Time); UTC_Timestamp : constant String := Image (Date => Time - Duration (UTC_Offset) * 60, Picture => Picture_String (Facility.Timestamp_Format)); begin return UTC_Timestamp; end; else declare Timestamp : constant String := Image (Date => Time, Picture => Picture_String (Facility.Timestamp_Format)); begin return Timestamp; end; end if; end Get_Timestamp; ------------------------------------------------------------------------- function Is_UTC_Timestamp (Facility : Class) return Boolean is begin return Facility.UTC_Timestamp; end Is_UTC_Timestamp; ------------------------------------------------------------------------- function Is_Write_Loglevel (Facility : Class) return Boolean is begin return Facility.Write_Loglevel; end Is_Write_Loglevel; ------------------------------------------------------------------------- function Is_Write_Source (Facility : Class) return Boolean is begin return Facility.Write_Source; end Is_Write_Source; ------------------------------------------------------------------------- function Is_Write_Timestamp (Facility : Class) return Boolean is begin return Facility.Write_Timestamp; end Is_Write_Timestamp; ------------------------------------------------------------------------- procedure Process (Facility : Class; Request : Log_Request.Instance) is Message : Unbounded_String; Level : constant Log_Level := Request.Get_Log_Level; Msg : constant String := Request.Get_Message; Source : constant String := Request.Get_Source; begin if Policy_DB.Accept_Dst (Identifier => Facility.Get_Name, Level => Level) then if Facility.Is_Write_Timestamp then Append (Source => Message, New_Item => Facility.Get_Timestamp & " "); end if; if Facility.Is_Write_Loglevel then Append (Source => Message, New_Item => "[" & Log_Level'Image (Level) (1 .. 4) & "] "); end if; if Source'Length > 0 and then Facility.Is_Write_Source then Append (Source => Message, New_Item => Source & ": "); end if; Append (Source => Message, New_Item => Msg); Facility.Write (Level => Level, Msg => To_String (Message)); end if; end Process; ------------------------------------------------------------------------- procedure Set_Name (Facility : in out Class; Name : String) is begin Facility.Name := To_Unbounded_String (Name); end Set_Name; ------------------------------------------------------------------------- procedure Toggle_UTC_Timestamp (Facility : in out Class; State : Boolean) is begin Facility.UTC_Timestamp := State; end Toggle_UTC_Timestamp; ------------------------------------------------------------------------- procedure Toggle_Write_Loglevel (Facility : in out Class; State : Boolean) is begin Facility.Write_Loglevel := State; end Toggle_Write_Loglevel; ------------------------------------------------------------------------- procedure Toggle_Write_Source (Facility : in out Class; State : Boolean) is begin Facility.Write_Source := State; end Toggle_Write_Source; ------------------------------------------------------------------------- procedure Toggle_Write_Timestamp (Facility : in out Class; State : Boolean) is begin Facility.Write_Timestamp := State; end Toggle_Write_Timestamp; end Alog.Facilities; libalog-0.4.1/src/alog-facilities.ads000066400000000000000000000120121172144577100174460ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Strings.Bounded; with Ada.Strings.Unbounded; with Ada.Command_Line; with Ada.Calendar; with Alog.Log_Request; -- Alog facilities package. Provides common data and methods used by all -- facilities. package Alog.Facilities is use Ada.Strings.Bounded; use Ada.Strings.Unbounded; type Instance is abstract tagged limited private; -- Abstract type facility instance. All facilities in the Alog framework -- must implement this type. subtype Class is Instance'Class; type Handle is access all Class; function "=" (Left : Handle; Right : Handle) return Boolean; -- Equal function. procedure Set_Name (Facility : in out Class; Name : String); -- Set facility name. function Get_Name (Facility : Class) return String; -- Get facility name. function Get_Timestamp (Facility : Class; Time : Ada.Calendar.Time := Ada.Calendar.Clock) return String; -- Creates a timestamp and returns it as String. If no Time is given, the -- current time is used. procedure Process (Facility : Class; Request : Log_Request.Instance); -- Process a log request. procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is abstract; -- Write message with specified log level. This procedure must be -- implemented by all facilities. procedure Toggle_Write_Timestamp (Facility : in out Class; State : Boolean); -- Enable/disable whether a timestamp is written for log messages. procedure Toggle_UTC_Timestamp (Facility : in out Class; State : Boolean); -- Enable/disable UTC timestamps for log messages. function Is_Write_Timestamp (Facility : Class) return Boolean; -- Returns the current value of Write_Timestamp. function Is_UTC_Timestamp (Facility : Class) return Boolean; -- Returns True if the timestamp of the facility is written in UTC time. procedure Toggle_Write_Loglevel (Facility : in out Class; State : Boolean); -- Enable/disable whether the loglevel is written for log messages. function Is_Write_Loglevel (Facility : Class) return Boolean; -- Returns the current value of Write_Loglevel. procedure Toggle_Write_Source (Facility : in out Class; State : Boolean); -- Enable/disable whether the source of the message is logged. function Is_Write_Source (Facility : Class) return Boolean; -- Returns True if writing of log message sources is enabled. procedure Setup (Facility : in out Instance) is null; -- Each facility must provide a Setup-procedure. These procedures are -- called by Logger instances when attaching Facilities. All needed -- operations prior to writing log messages should be done here. procedure Teardown (Facility : in out Instance) is null; -- Each facility must provide a Teardown-procedure. These procedures are -- called by Logger instances when detaching Facilities or when the logger -- object gets out of scope. package BS_Path is new Generic_Bounded_Length (Max_Path_Length); use BS_Path; -- Bounded string with length Max_Path_Length. Used in methods which -- involve filesystem operations. private type Instance is abstract tagged limited record Name : Unbounded_String := To_Unbounded_String (Ada.Command_Line.Command_Name); -- Facility Name. Defaults to command-name (first argument). If multiple -- facilities are used, names must be set differently. Timestamp_Format : String (1 .. 11) := "%b %d %Y %T"; -- Default timestamp format to use in this facility. Write_Timestamp : Boolean := True; -- If True, a timestamp is written with the log message. UTC_Timestamp : Boolean := False; -- If True, the timestamp is written in UTC time. -- (log message timestamps are written timezone-dependent). Write_Loglevel : Boolean := False; -- If True, the loglevel associated with the log message is written. Write_Source : Boolean := True; -- If True, the source of a log message is prepended to the message. end record; end Alog.Facilities; libalog-0.4.1/src/alog-helpers.adb000066400000000000000000000121121172144577100167540ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Text_IO; with Ada.Strings.Fixed; package body Alog.Helpers is ------------------------------------------------------------------------- function Assert_Files_Equal (Filename1 : String; Filename2 : String) return Boolean is File1 : D_IO.File_Type; File2 : D_IO.File_Type; Char1, Char2 : My_Rec; Result : Boolean := True; begin -- Open both files. Open (File => File1, Mode => In_File, Name => Filename1); Open (File => File2, Mode => In_File, Name => Filename2); -- Check length of files first. if Size (File1) /= Size (File2) then Close (File => File1); Close (File => File2); return False; end if; while not End_Of_File (File1) loop -- Read one byte from both files. Read (File => File1, Item => Char1); Read (File => File2, Item => Char2); -- Compare it. if Char1 /= Char2 then Result := False; end if; end loop; -- Close them files again. Close (File => File1); Close (File => File2); return Result; end Assert_Files_Equal; ------------------------------------------------------------------------- procedure Read_Loglevels (Filename : String; Default_Level : in out Log_Level; Identifiers : out Maps.Wildcard_Level_Map) is Conf_File : Ada.Text_IO.File_Type; Line_Count : Natural := 0; Line : String (1 .. 1_024); Last : Integer; begin Ada.Text_IO.Open (File => Conf_File, Mode => Ada.Text_IO.In_File, Name => Filename); while not Ada.Text_IO.End_Of_File (File => Conf_File) loop Ada.Text_IO.Get_Line (File => Conf_File, Item => Line, Last => Last); Line_Count := Line_Count + 1; if Last - Line'First >= 0 then declare Trimmed : constant String := Ada.Strings.Fixed.Trim (Source => Line (Line'First .. Last), Side => Ada.Strings.Both); Eq : Natural; begin if Trimmed'Length /= 0 and then Trimmed (Trimmed'First) /= '#' then Eq := Ada.Strings.Fixed.Index (Source => Trimmed, Pattern => "="); if Eq not in Trimmed'First + 1 .. Trimmed'Last then Ada.Text_IO.Close (File => Conf_File); raise Invalid_Config with "Syntax error in file " & Filename & " on line" & Line_Count'Img & ": no assignment operator"; end if; -- Line seems valid declare Key : constant String := Ada.Strings.Fixed.Trim (Source => Trimmed (Trimmed'First .. Eq - 1), Side => Ada.Strings.Both); Value : constant String := Ada.Strings.Fixed.Trim (Source => Trimmed (Eq + 1 .. Trimmed'Last), Side => Ada.Strings.Both); Loglevel : Log_Level; begin begin Loglevel := Log_Level'Value (Value); exception when others => Ada.Text_IO.Close (File => Conf_File); raise Invalid_Config with "Syntax error in file " & Filename & " on line" & Line_Count'Img & ": invalid loglevel '" & Value & "'"; end; if Key = "Default" or Key = "default" then Default_Level := Loglevel; else Identifiers.Insert (Key => Key, Item => Loglevel); end if; end; end if; end; end if; end loop; Ada.Text_IO.Close (File => Conf_File); end Read_Loglevels; end Alog.Helpers; libalog-0.4.1/src/alog-helpers.ads000066400000000000000000000040141172144577100167770ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Direct_IO; with Alog.Maps; -- Alog helper functions/procedures. package Alog.Helpers is function Assert_Files_Equal (Filename1 : String; Filename2 : String) return Boolean; -- Compare two files byte-wise. Returns True if both files are equal. -- The two files are closed but not removed after comparison. procedure Read_Loglevels (Filename : String; Default_Level : in out Log_Level; Identifiers : out Maps.Wildcard_Level_Map); -- Read default loglevels and (optional) identifier based loglevels from -- file given by filename. The format is as follows: -- -- # This is a comment (ignored) -- -- # Default loglevel -- Default = Info -- -- # Identifier-specific loglevels -- Foo.* = Debug -- Foo.Bar = Info -- -- If no default loglevel setting is found in the file, the loglevel passed -- as Default_Level parameter is returned unchanged. Invalid_Config : exception; -- Exception is raised if a loglevel config file is invalid. private type My_Rec is record Char : Character; end record; package D_IO is new Ada.Direct_IO (My_Rec); use D_IO; end Alog.Helpers; libalog-0.4.1/src/alog-log_request.adb000066400000000000000000000043231172144577100176500ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- package body Alog.Log_Request is use Ada.Strings.Unbounded; ------------------------------------------------------------------------- function Create (ID : Task_Id := Current_Task; Source : String := ""; Level : Log_Level := Debug; Message : String) return Instance is begin return Instance'(Caller_ID => ID, Source => To_Unbounded_String (Source), Level => Level, Message => To_Unbounded_String (Message)); end Create; ------------------------------------------------------------------------- function Get_Caller_ID (Request : Instance) return Task_Id is begin return Request.Caller_ID; end Get_Caller_ID; ------------------------------------------------------------------------- function Get_Log_Level (Request : Instance) return Log_Level is begin return Request.Level; end Get_Log_Level; ------------------------------------------------------------------------- function Get_Message (Request : Instance) return String is begin return To_String (Request.Message); end Get_Message; ------------------------------------------------------------------------- function Get_Source (Request : Instance) return String is begin return To_String (Request.Source); end Get_Source; end Alog.Log_Request; libalog-0.4.1/src/alog-log_request.ads000066400000000000000000000042711172144577100176730ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Task_Identification; with Ada.Strings.Unbounded; -- Log request type. Log request objects are used for asynchronous logging and -- hold all relevant information of a log request. package Alog.Log_Request is use Ada.Task_Identification; type Instance is tagged private; -- A log request contains all related information to log asynchronously -- (Caller identification, loglevel and message). function Create (ID : Task_Id := Current_Task; Source : String := ""; Level : Log_Level := Debug; Message : String) return Instance; -- Create a log request object from the specified parameters. function Get_Caller_ID (Request : Instance) return Task_Id; -- Return the caller ID of the request object. function Get_Source (Request : Instance) return String; -- Return the source of the request object. function Get_Log_Level (Request : Instance) return Log_Level; -- Return the loglevel of the request object. function Get_Message (Request : Instance) return String; -- Return the log message of the request object. private type Instance is tagged record Caller_ID : Task_Id := Null_Task_Id; Source : Ada.Strings.Unbounded.Unbounded_String; Level : Log_Level := Info; Message : Ada.Strings.Unbounded.Unbounded_String; end record; end Alog.Log_Request; libalog-0.4.1/src/alog-logger.adb000066400000000000000000000215131172144577100165760ustar00rootroot00000000000000-- -- Copyright (c) 2008-2010, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Alog.Log_Request; with Alog.Facilities.File_Descriptor; package body Alog.Logger is ------------------------------------------------------------------------- procedure Attach_Default_Facility (Logger : in out Instance) is begin if not Logger.Facilities.Contains (Key => To_Unbounded_String (Default_Facility_Name)) then declare Default_Handle : Facilities.File_Descriptor.Handle; begin Default_Handle := new Facilities.File_Descriptor.Instance; Default_Handle.Set_Name (Name => Default_Facility_Name); Logger.Attach_Facility (Facility => Facilities.Handle (Default_Handle)); end; end if; end Attach_Default_Facility; ------------------------------------------------------------------------- procedure Attach_Facility (Logger : in out Instance; Facility : Facilities.Handle) is F_Name : constant Unbounded_String := To_Unbounded_String (Facility.Get_Name); begin if Logger.Facilities.Contains (Key => F_Name) then raise Facility_Already_Present with "Facility '" & To_String (F_Name) & "' is already present."; end if; Logger.Facilities.Insert (Key => F_Name, New_Item => Facility); end Attach_Facility; ------------------------------------------------------------------------- procedure Attach_Transform (Logger : in out Instance; Transform : Transforms.Handle) is T_Name : constant Unbounded_String := To_Unbounded_String (Transform.Get_Name); begin if Logger.Transforms.Contains (Key => T_Name) then raise Transform_Already_Present with "Transform '" & To_String (T_Name) & "' is already present."; end if; Logger.Transforms.Insert (Key => T_Name, New_Item => Transform); end Attach_Transform; ------------------------------------------------------------------------- procedure Clear (L : in out Instance) is procedure Teardown_Facility (Handle : Facilities.Handle); -- Teardown a facility. procedure Teardown_Facility (Handle : Facilities.Handle) is begin Handle.Teardown; end Teardown_Facility; procedure Teardown_Transform (Handle : Transforms.Handle); -- Teardown a transform. procedure Teardown_Transform (Handle : Transforms.Handle) is begin Handle.Teardown; end Teardown_Transform; begin L.Facilities.Iterate (Process => Teardown_Facility'Access); L.Facilities.Clear; L.Transforms.Iterate (Process => Teardown_Transform'Access); L.Transforms.Clear; end Clear; ------------------------------------------------------------------------- procedure Detach_Default_Facility (Logger : in out Instance) is begin if Logger.Facilities.Contains (Key => To_Unbounded_String (Default_Facility_Name)) then Logger.Detach_Facility (Name => Default_Facility_Name); end if; end Detach_Default_Facility; ------------------------------------------------------------------------- procedure Detach_Facility (Logger : in out Instance; Name : String) is F_Name : constant Unbounded_String := To_Unbounded_String (Name); begin if not Logger.Facilities.Contains (Key => F_Name) then raise Facility_Not_Found with "Facility '" & Name & "' not found."; end if; Logger.Facilities.Delete (Key => F_Name); end Detach_Facility; ------------------------------------------------------------------------- procedure Detach_Transform (Logger : in out Instance; Name : String) is T_Name : constant Unbounded_String := To_Unbounded_String (Name); begin if not Logger.Transforms.Contains (Key => T_Name) then raise Transform_Not_Found with "Transform '" & Name & "' not found."; end if; Logger.Transforms.Delete (Key => T_Name); end Detach_Transform; ------------------------------------------------------------------------- function Facility_Count (Logger : Instance) return Natural is begin return Logger.Facilities.Length; end Facility_Count; ------------------------------------------------------------------------- procedure Finalize (Logger : in out Instance) is begin Logger.Clear; end Finalize; ------------------------------------------------------------------------- procedure Initialize (Logger : in out Instance) is begin if Logger.Init then Logger.Attach_Default_Facility; end if; end Initialize; ------------------------------------------------------------------------- procedure Iterate (Logger : Instance; Process : not null access procedure (Facility_Handle : Facilities.Handle)) is begin Logger.Facilities.Iterate (Process => Process); end Iterate; ------------------------------------------------------------------------- procedure Iterate (Logger : Instance; Process : not null access procedure (Transform_Handle : Transforms.Handle)) is begin Logger.Transforms.Iterate (Process => Process); end Iterate; ------------------------------------------------------------------------- procedure Log_Message (Logger : Instance; Source : String := ""; Level : Log_Level; Msg : String) is Out_Msg : String := Msg; Prefix : Unbounded_String; procedure Do_Log (Facility_Handle : Facilities.Handle); -- Log message for each facility. procedure Do_Log (Facility_Handle : Facilities.Handle) is New_Request : constant Log_Request.Instance := Log_Request.Create (Source => Source, Level => Level, Message => To_String (Prefix) & Out_Msg); begin Facility_Handle.Process (Request => New_Request); end Do_Log; procedure Do_Transform (Transform_Handle : Transforms.Handle); -- Call 'Transform_Message' for each transform. procedure Do_Transform (Transform_Handle : Transforms.Handle) is begin Out_Msg := Transform_Handle.Transform_Message (Level => Level, Msg => Out_Msg); end Do_Transform; begin Logger.Iterate (Process => Do_Transform'Access); Logger.Iterate (Process => Do_Log'Access); end Log_Message; ------------------------------------------------------------------------- function Transform_Count (Logger : Instance) return Natural is begin return Logger.Transforms.Length; end Transform_Count; ------------------------------------------------------------------------- procedure Update (Logger : Instance; Name : String; Process : not null access procedure (Facility_Handle : Facilities.Handle)) is F_Name : constant Unbounded_String := To_Unbounded_String (Name); begin if not Logger.Facilities.Contains (Key => F_Name) then raise Facility_Not_Found with "Facility '" & Name & "' not found"; end if; declare Handle : constant Facilities.Handle := Logger.Facilities.Element (Key => F_Name); begin Process (Facility_Handle => Handle); end; end Update; ------------------------------------------------------------------------- procedure Update (Logger : Instance; Name : String; Process : not null access procedure (Transform_Handle : Transforms.Handle)) is T_Name : constant Unbounded_String := To_Unbounded_String (Name); begin if not Logger.Transforms.Contains (Key => T_Name) then raise Transform_Not_Found with "Transform '" & Name & "' not found"; end if; declare Handle : constant Transforms.Handle := Logger.Transforms.Element (Key => T_Name); begin Process (Transform_Handle => Handle); end; end Update; end Alog.Logger; libalog-0.4.1/src/alog-logger.ads000066400000000000000000000145741172144577100166300ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Finalization; with Ada.Unchecked_Deallocation; with Ada.Strings.Unbounded; with Alog.Facilities; with Alog.Transforms; with Alog.Controlled_Map; -- Logger instance. Facilities can be attached to a logger instance in order -- to log to different targets simultaneously. A logger provides different -- helper functions for logging facilities configuration. package Alog.Logger is type Instance (Init : Boolean) is tagged limited private; -- Logger instance. The Init discriminant defines whether or not a default -- 'stdout' (FD facility without logfile set) is attached automatically. --- Set Init to 'True' if you want to make sure minimal stdout logging is -- possible as soon as a new logger is instantiated. type Handle is access all Instance; -- Handle to logger type. procedure Attach_Facility (Logger : in out Instance; Facility : Facilities.Handle); -- Attach a facility to logger instance. procedure Attach_Default_Facility (Logger : in out Instance); -- Attach default facility with name Default_Facility_Name to logger -- instance. If the default facility is already attached do nothing. procedure Detach_Facility (Logger : in out Instance; Name : String); -- Detach a facility with name 'Name' from logger instance. If the facility -- is not found a Facility_Not_Found exception is raised. procedure Detach_Default_Facility (Logger : in out Instance); -- Detach default facility with name Default_Facility_Name from logger -- instance. If the default facility is not attached do nothing. function Facility_Count (Logger : Instance) return Natural; -- Return number of attached facilites. procedure Update (Logger : Instance; Name : String; Process : not null access procedure (Facility_Handle : Facilities.Handle)); -- Update a specific Facility identified by 'Name'. Call the 'Process' -- procedure to perform the update operation. procedure Iterate (Logger : Instance; Process : not null access procedure (Facility_Handle : Facilities.Handle)); -- Call 'Process' for all attached facilities. procedure Attach_Transform (Logger : in out Instance; Transform : Transforms.Handle); -- Attach a transform to logger instance. procedure Detach_Transform (Logger : in out Instance; Name : String); -- Detach a transform with name 'Name' from logger instance. If the -- transform is not found a Transform_Not_Found exception is raised. function Transform_Count (Logger : Instance) return Natural; -- Return number of attached transforms. procedure Update (Logger : Instance; Name : String; Process : not null access procedure (Transform_Handle : Transforms.Handle)); -- Update a specific Transform identified by 'Name'. Call the 'Process' -- procedure to perform the update operation. procedure Iterate (Logger : Instance; Process : not null access procedure (Transform_Handle : Transforms.Handle)); -- Call 'Process' for all attached transforms. procedure Clear (L : in out Instance); -- Clear logger instance. Detach and teardown all attached facilities and -- transforms. procedure Log_Message (Logger : Instance; Source : String := ""; Level : Log_Level; Msg : String); -- Log a message. The Write_Message() procedure of all attached facilities -- is called. Depending on the Log-Threshold set, the message is logged to -- different targets (depending on the facilites) automatically. -- -- Prior to actually processing the given log message the policy database -- is inquired if the log message with given source and level should be -- logged. procedure Free is new Ada.Unchecked_Deallocation (Object => Facilities.Class, Name => Facilities.Handle); -- Free memory allocated by a facility. procedure Free is new Ada.Unchecked_Deallocation (Object => Transforms.Class, Name => Transforms.Handle); -- Free memory allocated by a transform. Facility_Not_Found : exception; -- Will be raised if a requested facility is not found. Facility_Already_Present : exception; -- Will be raised if a facility is already present. Transform_Not_Found : exception; -- Will be raised if a requested transform is not found. Transform_Already_Present : exception; -- Will be raised if a facility is already present. . Default_Facility_Name : constant String := "__Default_Facility"; private use Ada.Strings.Unbounded; use Alog.Facilities; use Alog.Transforms; procedure Initialize (Logger : in out Instance); -- Initialize the logger instance. procedure Finalize (Logger : in out Instance); -- Finalize procedure used to cleanup. package Map_Of_Transforms_Package is new Alog.Controlled_Map (Key_Type => Unbounded_String, Element_Type => Transforms.Class, Element_Handle => Transforms.Handle); package MOTP renames Map_Of_Transforms_Package; package Map_Of_Facilities_Package is new Alog.Controlled_Map (Key_Type => Unbounded_String, Element_Type => Facilities.Class, Element_Handle => Facilities.Handle); package MOFP renames Map_Of_Facilities_Package; type Instance (Init : Boolean) is new Ada.Finalization.Limited_Controlled with record Facilities : MOFP.Map; -- Attached facilities. Transforms : MOTP.Map; -- Attached transforms. end record; end Alog.Logger; libalog-0.4.1/src/alog-maps.adb000066400000000000000000000071521172144577100162620ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Strings.Fixed; package body Alog.Maps is ------------------------------------------------------------------------- procedure Clear (Map : in out Wildcard_Level_Map) is begin Map.Data.Clear; end Clear; ------------------------------------------------------------------------- function Element (Map : Wildcard_Level_Map; Key : String) return Log_Level is begin return Map.Data.Element (Key => To_Unbounded_String (Key)); end Element; ------------------------------------------------------------------------- function Element (Position : Cursor) return Log_Level is begin return MOLP.Element (Position => MOLP.Cursor (Position)); end Element; ------------------------------------------------------------------------- function Find (Map : Wildcard_Level_Map; Key : String) return Cursor is begin return Cursor (Map.Data.Find (Key => To_Unbounded_String (Key))); end Find; ------------------------------------------------------------------------- procedure Insert (Map : in out Wildcard_Level_Map; Key : String; Item : Log_Level) is Position : MOLP.Cursor; Insert_Ok : Boolean := False; begin Map.Data.Insert (Key => To_Unbounded_String (Key), New_Item => Item, Position => Position, Inserted => Insert_Ok); if not Insert_Ok then Map.Data.Replace_Element (Position => Position, New_Item => Item); end if; end Insert; ------------------------------------------------------------------------- function Length (Map : Wildcard_Level_Map) return Natural is begin return Natural (Map.Data.Length); end Length; ------------------------------------------------------------------------- function Lookup (Map : Wildcard_Level_Map; Key : String) return Cursor is Position : Cursor; begin -- Exact match Position := Map.Find (Key => Key); if Position /= No_Element then return Position; end if; Find_Closest_Match : declare Substr_Index : Integer := Key'Last; begin while Substr_Index > 0 loop Position := Map.Find (Key => Key (Key'First .. Substr_Index) & "." & Wildcard); if Position /= No_Element then return Position; end if; Substr_Index := Ada.Strings.Fixed.Index (Source => Key, Pattern => ".", From => Substr_Index, Going => Ada.Strings.Backward) - 1; end loop; end Find_Closest_Match; return No_Element; end Lookup; end Alog.Maps; libalog-0.4.1/src/alog-maps.ads000066400000000000000000000064411172144577100163030ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Strings.Unbounded.Hash; with Ada.Containers.Hashed_Maps; -- Alog maps package. Provides map data types. package Alog.Maps is type Wildcard_Level_Map is tagged private; -- A map of loglevels with string as key type. type Cursor is private; -- Index for a map element. No_Element : constant Cursor; Wildcard : constant Character := '*'; -- Character used as wildcard indicator in lookups. function Element (Map : Wildcard_Level_Map; Key : String) return Log_Level; -- Returns the loglevel element for given key. function Element (Position : Cursor) return Log_Level; -- Returns the loglevel element at given position. function Find (Map : Wildcard_Level_Map; Key : String) return Cursor; -- Returns the position for an element with specified key. If no element is -- found No_Element is returned. function Lookup (Map : Wildcard_Level_Map; Key : String) return Cursor; -- Returns the position of the element with the closest match to given key. -- This function considers wildcards when searching for an element. -- -- Example: Key | Element -- ------------------- -- Foo.* | Debug -- Foo.Bar | Alert -- -- A lookup for "Foo.Foo" has no exact match. The next closest match is -- "Foo.*" which will return the Debug element. Looking for "Foo" will -- return Debug since it matches the wildcard "Foo.*". -- -- If no exact and wildcard match is found No_Element is returned. procedure Insert (Map : in out Wildcard_Level_Map; Key : String; Item : Log_Level); -- Insert given key/item pair into map. If given key is already present the -- associated item is replaced. procedure Clear (Map : in out Wildcard_Level_Map); -- Clears the wildcard map. function Length (Map : Wildcard_Level_Map) return Natural; -- Return the number of elements in the map. private use Ada.Strings.Unbounded; package Map_Of_Loglevels_Package is new Ada.Containers.Hashed_Maps (Key_Type => Unbounded_String, Element_Type => Log_Level, Hash => Hash, Equivalent_Keys => "="); package MOLP renames Map_Of_Loglevels_Package; type Wildcard_Level_Map is tagged record Data : MOLP.Map; end record; type Cursor is new MOLP.Cursor; No_Element : constant Cursor := Cursor (MOLP.No_Element); end Alog.Maps; libalog-0.4.1/src/alog-policy_db.adb000066400000000000000000000072531172144577100172700ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- package body Alog.Policy_DB is Current_Default_Loglevel : Log_Level := Alog_Default_Level; -- Current default loglevel. Ident_Levels : Maps.Wildcard_Level_Map; -- Identifier based loglevels. ------------------------------------------------------------------------- function Accept_Dst (Identifier : String; Level : Log_Level) return Boolean is use type Alog.Maps.Cursor; Position : Maps.Cursor; begin Position := Ident_Levels.Lookup (Key => Identifier); if Position /= Maps.No_Element then return Level >= Maps.Element (Position => Position); end if; return True; end Accept_Dst; ------------------------------------------------------------------------- function Accept_Src (Identifier : String := ""; Level : Log_Level) return Boolean is begin return Level >= Lookup (Identifier => Identifier); end Accept_Src; ------------------------------------------------------------------------- function Get_Default_Loglevel return Log_Level is begin return Current_Default_Loglevel; end Get_Default_Loglevel; ------------------------------------------------------------------------- function Get_Loglevel (Identifier : String) return Log_Level is begin return Ident_Levels.Element (Key => Identifier); exception when Constraint_Error => raise No_Ident_Loglevel with "No loglevel for identifier '" & Identifier & "'"; end Get_Loglevel; ------------------------------------------------------------------------- function Lookup (Identifier : String) return Log_Level is use type Alog.Maps.Cursor; Position : Maps.Cursor; begin Position := Ident_Levels.Lookup (Key => Identifier); if Position /= Maps.No_Element then return Maps.Element (Position => Position); end if; return Current_Default_Loglevel; end Lookup; ------------------------------------------------------------------------- procedure Reset is begin Current_Default_Loglevel := Alog_Default_Level; Ident_Levels.Clear; end Reset; ------------------------------------------------------------------------- procedure Set_Default_Loglevel (Level : Log_Level) is begin Current_Default_Loglevel := Level; end Set_Default_Loglevel; ------------------------------------------------------------------------- procedure Set_Loglevel (Identifier : String; Level : Log_Level) is begin Ident_Levels.Insert (Key => Identifier, Item => Level); end Set_Loglevel; ------------------------------------------------------------------------- procedure Set_Loglevel (Identifiers : Maps.Wildcard_Level_Map) is begin Ident_Levels := Identifiers; end Set_Loglevel; end Alog.Policy_DB; libalog-0.4.1/src/alog-policy_db.ads000066400000000000000000000066271172144577100173150ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Alog.Maps; -- Logging policy database package. This DB stores logging policies. Policies -- in the database are used inside the framework for logging decisions. package Alog.Policy_DB is Alog_Default_Level : constant Log_Level := Info; -- Framework default loglevel. procedure Set_Default_Loglevel (Level : Log_Level); -- Set given loglevel as default loglevel. function Get_Default_Loglevel return Log_Level; -- Return current default loglevel. procedure Set_Loglevel (Identifier : String; Level : Log_Level); -- Set given loglevel for specified identifier string. If the identifier is -- already present the loglevel is updated. Identifier strings are -- case-sensitive. -- -- Use wildcards to specify a loglevel for a range of identifiers. -- Identifier hierarchies are separated by dots, the wildcard is '*'. The -- following example sets a Debug loglevel for all log-identifiers in -- Foo.Bar (including Foo.Bar). -- -- Example: -- Foo.Bar.* = Debug -- -- Direct matches take precedence over wildcard matches. In the following -- example the loglevel for identifier 'Foo.Bar' is explicitly set to Info. -- -- Example: -- Foo.Bar = Info -- Foo.Bar.* = Debug procedure Set_Loglevel (Identifiers : Maps.Wildcard_Level_Map); -- Apply loglevels for identifiers stored in map. function Get_Loglevel (Identifier : String) return Log_Level; -- Return loglevel for given identifier string. Raises No_Ident_Loglevel -- exception if no entry for given identifier is found (exact match only, -- no wildcard lookup). function Lookup (Identifier : String) return Log_Level; -- Return loglevel for given identifier string. Returns the closest match, -- if no associated loglevel is found the default loglevel is returned. procedure Reset; -- Reset the logging policy database to the initial state. function Accept_Src (Identifier : String := ""; Level : Log_Level) return Boolean; -- Returns True if the given loglevel is accepted for a source identifier. -- If no identifier is given, the loglevel is verified against the default -- loglevel. function Accept_Dst (Identifier : String; Level : Log_Level) return Boolean; -- Returns True if the given loglevel is accepted for a destination -- identifier. If no match for the given identifier is found True is -- returned. No_Ident_Loglevel : exception; -- Will be raised if loglevel is not found for a requested identifier. end Alog.Policy_DB; libalog-0.4.1/src/alog-protected_containers.adb000066400000000000000000000052721172144577100215410ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- package body Alog.Protected_Containers is ------------------------------------------------------------------------- protected body Log_Request_List is ---------------------------------------------------------------------- entry All_Done when Requests.Is_Empty and then Pending_Counter = 0 is begin null; end All_Done; ---------------------------------------------------------------------- procedure Clear is begin Requests.Clear; Pending_Counter := 0; end Clear; ---------------------------------------------------------------------- procedure Done is begin if Pending_Counter = 0 then return; end if; Pending_Counter := Pending_Counter - 1; end Done; ---------------------------------------------------------------------- entry Get (Element : out Log_Request.Instance) when Requests_Available is begin Element := Requests.First_Element; Requests.Delete_First; Pending_Counter := Pending_Counter + 1; if Requests.Is_Empty then Requests_Available := False; end if; end Get; ---------------------------------------------------------------------- function Length return Natural is begin return Natural (Requests.Length); end Length; ---------------------------------------------------------------------- function Pending return Natural is begin return Pending_Counter; end Pending; ---------------------------------------------------------------------- procedure Put (Element : Log_Request.Instance) is begin Requests.Append (New_Item => Element); Requests_Available := True; end Put; end Log_Request_List; end Alog.Protected_Containers; libalog-0.4.1/src/alog-protected_containers.ads000066400000000000000000000053141172144577100215570ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Containers.Doubly_Linked_Lists; with Alog.Log_Request; -- Alog Protected Containers. This package provides protected containers which -- are safe for concurrent access. package Alog.Protected_Containers is ---------------------- -- Log_Request_List -- ---------------------- type Log_Request_Storage is private; protected type Log_Request_List is procedure Put (Element : Log_Request.Instance); -- Put an element at the end of the request list. entry Get (Element : out Log_Request.Instance); -- Get the first element from the list (and delete it). procedure Done; -- Signal successfull processing of request previously gotten from list. entry All_Done; -- This procedure blocks until the list is empty and there are no -- pending requests. A requests is pending when it is taken off the list -- via Get but it's successfull processing has not been signaled back -- via the procedure Done. procedure Clear; -- Clear the request list by deleting all log requests. function Length return Natural; -- Return the number of elements in the list. function Pending return Natural; -- Return the number of pending requests. private Requests : Log_Request_Storage; Requests_Available : Boolean := False; Pending_Counter : Natural := 0; end Log_Request_List; -- Protected variant of a log request list. This list holds log request -- objects and is safe for concurrent access. It operates in FIFO-Mode. private use type Alog.Log_Request.Instance; package List_Of_Log_Requests_Package is new Ada.Containers.Doubly_Linked_Lists (Element_Type => Log_Request.Instance); package LOLRP renames List_Of_Log_Requests_Package; type Log_Request_Storage is new LOLRP.List with null record; end Alog.Protected_Containers; libalog-0.4.1/src/alog-tasked_logger.adb000066400000000000000000000207761172144577100201430ustar00rootroot00000000000000-- -- Copyright (c) 2009-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Text_IO; with Ada.Exceptions; with Ada.Strings.Unbounded; with Alog.Logger; package body Alog.Tasked_Logger is use Ada.Strings.Unbounded; procedure F_Dummy (Facility_Handle : Facilities.Handle) is null; -- This procedure is needed to initialize the 'Current_Facility_Proc' -- handle of type Facility_Update_Handle since that type is defined as -- 'not null'. procedure Default_Handler (Except : Ada.Exceptions.Exception_Occurrence; Caller : Ada.Task_Identification.Task_Id); -- Tasked logger default exception handling callback. Prints the calling -- task's ID and exception information to stderr. ------------------------------------------------------------------------- procedure Default_Handler (Except : Ada.Exceptions.Exception_Occurrence; Caller : Ada.Task_Identification.Task_Id) is use Ada.Task_Identification; begin Ada.Text_IO.Put_Line (File => Ada.Text_IO.Current_Error, Item => "Logging exception while processing request for task with ID " & Image (T => Caller)); Ada.Text_IO.Put_Line (File => Ada.Text_IO.Current_Error, Item => Ada.Exceptions.Exception_Information (Except)); end Default_Handler; ------------------------------------------------------------------------- task body Instance is use type Ada.Task_Identification.Task_Id; Except_Handler : Exceptions.Exception_Handler := Default_Handler'Access; -- Exception handler callback, initialized to default handler. Logsink : Alog.Logger.Instance (Init => Init); Current_Source : Unbounded_String; Current_Level : Log_Level; Current_Message : Unbounded_String; Current_Caller : Ada.Task_Identification.Task_Id; Current_Facility_Name : Unbounded_String; Current_Facility_Proc : Facility_Update_Handle := F_Dummy'Access; begin Main_Loop : loop begin select ------------------------------------------------------------- accept Attach_Facility (Facility : Facilities.Handle) do Logsink.Attach_Facility (Facility => Facility); end Attach_Facility; or ------------------------------------------------------------- accept Attach_Default_Facility do Logsink.Attach_Default_Facility; end Attach_Default_Facility; or ------------------------------------------------------------- accept Detach_Facility (Name : String) do Logsink.Detach_Facility (Name => Name); end Detach_Facility; or ------------------------------------------------------------- accept Detach_Default_Facility do Logsink.Detach_Default_Facility; end Detach_Default_Facility; or ------------------------------------------------------------- accept Facility_Count (Count : out Natural) do Count := Logsink.Facility_Count; end Facility_Count; or ------------------------------------------------------------- accept Update (Name : String; Process : Facility_Update_Handle) do Current_Facility_Name := To_Unbounded_String (Name); Current_Facility_Proc := Process; Current_Caller := Instance.Update'Caller; end Update; begin Logsink.Update (Name => To_String (Current_Facility_Name), Process => Current_Facility_Proc); exception when E : others => Except_Handler (Except => E, Caller => Current_Caller); end; or ------------------------------------------------------------- accept Iterate (Process : Facility_Update_Handle) do Current_Facility_Proc := Process; Current_Caller := Instance.Iterate'Caller; end Iterate; begin Logsink.Iterate (Process => Current_Facility_Proc); exception when E : others => Except_Handler (Except => E, Caller => Current_Caller); end; or ------------------------------------------------------------- accept Attach_Transform (Transform : Transforms.Handle) do Logsink.Attach_Transform (Transform => Transform); end Attach_Transform; or ------------------------------------------------------------- accept Detach_Transform (Name : String) do Logsink.Detach_Transform (Name => Name); end Detach_Transform; or ------------------------------------------------------------- accept Transform_Count (Count : out Natural) do Count := Logsink.Transform_Count; end Transform_Count; or ------------------------------------------------------------- accept Clear do Logsink.Clear; end Clear; or ------------------------------------------------------------- accept Log_Message (Source : String := ""; Level : Log_Level; Msg : String; Caller : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Null_Task_Id) do Current_Source := To_Unbounded_String (Source); Current_Level := Level; Current_Message := To_Unbounded_String (Msg); -- Log_Message'Caller can not be used as default parameter -- so we need to check for 'Null_Task_Id' instead. if Caller = Ada.Task_Identification.Null_Task_Id then Current_Caller := Log_Message'Caller; else Current_Caller := Caller; end if; end Log_Message; begin Logsink.Log_Message (Source => To_String (Current_Source), Level => Current_Level, Msg => To_String (Current_Message)); exception when E : others => Except_Handler (Except => E, Caller => Current_Caller); end; or ------------------------------------------------------------- accept Shutdown; exit Main_Loop; or ----------------------------------------------------------- accept Set_Except_Handler (Proc : Exceptions.Exception_Handler) do Except_Handler := Proc; end Set_Except_Handler; or terminate; end select; -- Exceptions raised during a rendezvous are raised here and in -- the calling task. Catch and ignore it so the tasked logger does -- not get terminated after an exception. exception when others => null; end; end loop Main_Loop; end Instance; end Alog.Tasked_Logger; libalog-0.4.1/src/alog-tasked_logger.ads000066400000000000000000000103231172144577100201470ustar00rootroot00000000000000-- -- Copyright (c) 2009-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Task_Identification; with Alog.Exceptions; with Alog.Facilities; with Alog.Transforms; -- Tasked Logger instance. Facilities can be attached to this logger instance -- in order to log to different targets simultaneously. This instance provides -- task-safe concurrent logging. package Alog.Tasked_Logger is type Facility_Update_Handle is not null access procedure (Facility_Handle : Facilities.Handle); -- Handle to facility update procedure. task type Instance (Init : Boolean := False) is entry Attach_Facility (Facility : Facilities.Handle); -- Attach a facility to tasked logger instance. entry Attach_Default_Facility; -- Attach default facility to tasked logger instance. entry Detach_Facility (Name : String); -- Detach a facility from tasked logger instance. entry Detach_Default_Facility; -- Detach default facility from tasked logger instance. entry Facility_Count (Count : out Natural); -- Return number of attached facilites. entry Update (Name : String; Process : Facility_Update_Handle); -- Update a specific facility identified by 'Name'. Calls the 'Process' -- procedure to perform the update operation. entry Iterate (Process : Facility_Update_Handle); -- Call 'Process' for all attached facilities. entry Attach_Transform (Transform : Transforms.Handle); -- Attach a transform to tasked logger instance. entry Detach_Transform (Name : String); -- Detach a transform from tasked logger instance. entry Transform_Count (Count : out Natural); -- Return number of attached transforms. entry Log_Message (Source : String := ""; Level : Log_Level; Msg : String; Caller : Ada.Task_Identification.Task_Id := Ada.Task_Identification.Null_Task_Id); -- Log a message. The Write_Message() procedure of all attached -- facilities is called. Depending on the Log-Threshold set, the message -- is logged to different targets (depending on the facilites) -- automatically. If an exception occurs, the exception handler -- procedure is called. -- -- If caller is not specified the executing task's ID is used instead. -- Since Log_Message'Caller can not be used as default parameter the -- entry checks if the variable is set to 'Null_Task_Id' in the body. entry Clear; -- Clear tasked logger instance. Detach and teardown all attached -- facilities and transforms and clear any stored exceptions. entry Shutdown; -- Explicitly shutdown tasked logger. entry Set_Except_Handler (Proc : Exceptions.Exception_Handler); -- Set custom exception handler procedure. end Instance; -- Tasked logger instance. The Init discriminant defines whether or not a -- default 'stdout' (FD facility without logfile set) is attached -- automatically. Default is 'False'. Set Init to 'True' if you want to -- make sure minimal stdout logging is possible as soon as a new logger is -- instantiated. -- -- By default exceptions which occur during asynchronous processing are -- printed to standard error. Use the Set_Except_Handler entry to register -- a custom exception handler. type Handle is access all Instance; -- Handle to tasked logger type. end Alog.Tasked_Logger; libalog-0.4.1/src/alog-transforms-casing.adb000066400000000000000000000031601172144577100207550ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Characters.Handling; package body Alog.Transforms.Casing is ------------------------------------------------------------------------- procedure Set_Mode (Transform : in out Instance; Mode : Operation_Mode) is begin Transform.Mode := Mode; end Set_Mode; ------------------------------------------------------------------------- function Transform_Message (Transform : Instance; Level : Log_Level := Info; Msg : String) return String is pragma Unreferenced (Level); begin if Transform.Mode = Lowercase then return Ada.Characters.Handling.To_Lower (Msg); else return Ada.Characters.Handling.To_Upper (Msg); end if; end Transform_Message; end Alog.Transforms.Casing; libalog-0.4.1/src/alog-transforms-casing.ads000066400000000000000000000031671172144577100210050ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- -- Casing transform. Used to transform casing (lower/uppercase) of messages package Alog.Transforms.Casing is type Operation_Mode is (Uppercase, Lowercase); type Instance is new Alog.Transforms.Instance with private; -- Casing transform. type Handle is access all Instance; overriding function Transform_Message (Transform : Instance; Level : Log_Level := Info; Msg : String) return String; -- Implementation of Transform_Message. procedure Set_Mode (Transform : in out Instance; Mode : Operation_Mode); -- Set operation mode of transform. private type Instance is new Alog.Transforms.Instance with record Mode : Operation_Mode := Lowercase; -- Mode of operation. end record; end Alog.Transforms.Casing; libalog-0.4.1/src/alog-transforms.adb000066400000000000000000000030451172144577100175150ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- package body Alog.Transforms is ------------------------------------------------------------------------- function "=" (Left : Handle; Right : Handle) return Boolean is begin return Left.Get_Name = Right.Get_Name; end "="; ------------------------------------------------------------------------- function Get_Name (Transform : Class) return String is begin return To_String (Transform.Name); end Get_Name; ------------------------------------------------------------------------- procedure Set_Name (Transform : in out Class; Name : String) is begin Transform.Name := To_Unbounded_String (Name); end Set_Name; end Alog.Transforms; libalog-0.4.1/src/alog-transforms.ads000066400000000000000000000046751172144577100175500ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Strings.Unbounded; -- Abstract package Transforms. Provides methods used by all Alog transforms. package Alog.Transforms is use Ada.Strings.Unbounded; type Instance is abstract tagged limited private; -- Abstract type transform instance. All tranforms in the Alog framework -- must implement this type. subtype Class is Instance'Class; type Handle is access Class; function "=" (Left : Handle; Right : Handle) return Boolean; -- Equal function. procedure Set_Name (Transform : in out Class; Name : String); -- Set transform name. function Get_Name (Transform : Class) return String; -- Get transform name. function Transform_Message (Transform : Instance; Level : Log_Level; Msg : String) return String is abstract; -- Transform message with specified log level. procedure Setup (Transform : in out Instance) is null; -- Each transform must provide a Setup-procedure. These procedures are -- called by logger instances when attaching Transforms. All needed -- operations prior to transforming log messages should be done here. procedure Teardown (Transform : in out Instance) is null; -- Each transform must provide a Teardown-procedure. These procedures are -- called by logger instances when detaching Transforms or when the logger -- object gets out of scope. private type Instance is abstract tagged limited record Name : Unbounded_String := To_Unbounded_String ("sample-transform"); -- Transform Name. Names must be unique. end record; end Alog.Transforms; libalog-0.4.1/src/alog.ads000066400000000000000000000027021172144577100153410ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- pragma Detect_Blocking; -- Alog: Ada Logging Components. Provides easy to use API for different -- logging facilities and log message transforms. package Alog is pragma Preelaborate; type Log_Level is (Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency); -- Provided log levels. These log levels can be used to categorize log -- messages. Max_Path_Length : constant Natural := 128; -- Maximal length of path names. Max_Facilities : constant Natural := 15; -- Maximum number of facilities a single logger instance -- can manage. end Alog; libalog-0.4.1/tests/000077500000000000000000000000001172144577100143005ustar00rootroot00000000000000libalog-0.4.1/tests/active_logger_tests.adb000066400000000000000000000456721172144577100210220ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Directories; with Ahven; with Alog.Helpers; with Alog.Facilities.File_Descriptor; with Alog.Facilities.Syslog; with Alog.Transforms.Casing; with Alog.Logger; with Alog.Active_Logger; package body Active_Logger_Tests is use Ahven; use Alog; Ref_Facility_Name : constant String := "Test_Facility_Name"; Counter : Natural := 0; pragma Atomic (Counter); procedure Check_Facility (Facility_Handle : Facilities.Handle); -- Verify that facility with given name is present in the logger. procedure Inc_Counter (F_Handle : Facilities.Handle); -- Increment counter. procedure Toggle_Timestamp (Facility_Handle : Facilities.Handle); -- Helper function for update facility test: Set the facility's write -- timestamp flag to True. ------------------------------------------------------------------------- procedure Attach_Facility is Log : aliased Active_Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; begin Facility.Set_Name (Name => Ref_Facility_Name); declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Assert (Condition => Log.Facility_Count = 0, Message => "Facility count not 0"); Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "Could not attach facility"); Log.Update (Name => Facility.Get_Name, Process => Check_Facility'Access); begin Log.Attach_Facility (Facility => Facility); Fail (Message => "Attached duplicate facility"); exception when Logger.Facility_Already_Present => null; end; end; end Attach_Facility; ------------------------------------------------------------------------- procedure Attach_Transform is Log : aliased Active_Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Assert (Condition => Log.Transform_Count = 0, Message => "transform count not 0"); Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach transform"); begin Log.Attach_Transform (Transform => Transform); Fail (Message => "attached duplicate transform"); exception when Logger.Transform_Already_Present => null; end; end; end Attach_Transform; ------------------------------------------------------------------------- procedure Check_Facility (Facility_Handle : Facilities.Handle) is use type Facilities.Handle; begin Assert (Condition => Facility_Handle.Get_Name = Ref_Facility_Name, Message => "facility name mismatch"); end Check_Facility; ------------------------------------------------------------------------- procedure Clear_A_Logger is Log : aliased Active_Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Transform : constant Transforms.Handle := new Transforms.Casing.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "could not attach facility"); Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach transform"); Log.Clear; Assert (Condition => Log.Facility_Count = 0, Message => "facility count is not 0"); Assert (Condition => Log.Transform_Count = 0, Message => "transform count is not 0"); end; end Clear_A_Logger; ------------------------------------------------------------------------- procedure Default_Facility_Handling is Logger1 : aliased Active_Logger.Instance (Init => False); Logger2 : aliased Active_Logger.Instance (Init => True); begin declare Shutdown1 : Active_Logger.Shutdown_Helper (Logger => Logger1'Access); Shutdown2 : Active_Logger.Shutdown_Helper (Logger => Logger2'Access); pragma Unreferenced (Shutdown1); pragma Unreferenced (Shutdown2); begin Logger1.Attach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 1, Message => "Unable to attach facility"); Logger1.Attach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 1, Message => "Attached facility twice"); Logger1.Log_Message (Level => Debug, Msg => "Testing default logger"); Logger1.Detach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 0, Message => "Unable to detach facility"); Logger2.Attach_Default_Facility; Assert (Condition => Logger2.Facility_Count = 1, Message => "Attached facility to initialzed logger"); Logger2.Detach_Default_Facility; Assert (Condition => Logger2.Facility_Count = 0, Message => "Unable to detach facility from initialized" & " logger"); end; end Default_Facility_Handling; ------------------------------------------------------------------------- procedure Detach_Facility_Instance is Log : aliased Active_Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.Syslog.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Facility.Set_Name ("Syslog_Facility"); Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "could not attach"); Log.Detach_Facility (Name => Facility.Get_Name); Assert (Condition => Log.Facility_Count = 0, Message => "could not detach"); end; end Detach_Facility_Instance; ------------------------------------------------------------------------- procedure Detach_Facility_Unattached is Log : aliased Active_Logger.Instance (Init => False); Facility : Facilities.Handle := new Facilities.File_Descriptor.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Log.Detach_Facility (Name => Facility.Get_Name); Fail (Message => "could detach unattached facility"); exception when Logger.Facility_Not_Found => -- Free not attached facility, this is not done by the logger -- (since it was never attached). Alog.Logger.Free (Facility); -- Test passed. end; end Detach_Facility_Unattached; ------------------------------------------------------------------------- procedure Detach_Transform_Instance is Log : aliased Active_Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Transform.Set_Name ("Casing_Transform"); Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach"); Log.Detach_Transform (Name => Transform.Get_Name); Assert (Condition => Log.Transform_Count = 0, Message => "could not detach"); end; end Detach_Transform_Instance; ------------------------------------------------------------------------- procedure Detach_Transform_Unattached is Log : aliased Active_Logger.Instance (Init => False); Transform : Transforms.Handle := new Transforms.Casing.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Transform.Set_Name ("Casing_Transform"); Log.Detach_Transform (Name => Transform.Get_Name); Fail (Message => "could detach unattached transform"); exception when Logger.Transform_Not_Found => -- Free not attached Transform, this is not done by the logger -- (since it was never attached). Alog.Logger.Free (Transform); -- Test passed. end; end Detach_Transform_Unattached; ------------------------------------------------------------------------- procedure Inc_Counter (F_Handle : Facilities.Handle) is pragma Unreferenced (F_Handle); begin Counter := Counter + 1; end Inc_Counter; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for active Logger"); T.Add_Test_Routine (Routine => Attach_Facility'Access, Name => "attach a facility"); T.Add_Test_Routine (Routine => Update_Facility'Access, Name => "update a facility"); T.Add_Test_Routine (Routine => Detach_Facility_Instance'Access, Name => "detach facility: instance"); T.Add_Test_Routine (Routine => Detach_Facility_Unattached'Access, Name => "detach not attached facility"); T.Add_Test_Routine (Routine => Attach_Transform'Access, Name => "attach a transform"); T.Add_Test_Routine (Routine => Detach_Transform_Instance'Access, Name => "detach a transform"); T.Add_Test_Routine (Routine => Detach_Transform_Unattached'Access, Name => "detach not attached transform"); T.Add_Test_Routine (Routine => Clear_A_Logger'Access, Name => "clear logger"); T.Add_Test_Routine (Routine => Verify_Logger_Initialization'Access, Name => "logger initialization behavior"); T.Add_Test_Routine (Routine => Default_Facility_Handling'Access, Name => "default facility handling"); T.Add_Test_Routine (Routine => Tasked_One_FD_Facility'Access, Name => "log with active logger"); T.Add_Test_Routine (Routine => Verify_Iterate_Facilities'Access, Name => "verify iterate facilities"); T.Add_Test_Routine (Routine => Task_Termination'Access, Name => "task termination"); T.Add_Test_Routine (Routine => Request_Queue_Length'Access, Name => "request queue length"); end Initialize; ------------------------------------------------------------------------- procedure Request_Queue_Length is Log : aliased Active_Logger.Instance (Init => False); begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Assert (Condition => Log.Get_Queue_Length = 0, Message => "Queue not empty"); end; end Request_Queue_Length; ------------------------------------------------------------------------- procedure Task_Termination is Log : aliased Active_Logger.Instance (Init => False); begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Assert (Condition => Log.Is_Terminated = False, Message => "New Logger terminated"); declare Counter : Natural := 0; begin Log.Shutdown; while not Log.Is_Terminated loop delay 0.01; Counter := Counter + 1; if Counter = 200 then Fail (Message => "Logger still running"); end if; end loop; end; end; end Task_Termination; ------------------------------------------------------------------------- procedure Tasked_One_FD_Facility is Log : aliased Active_Logger.Instance (Init => False); Fd_Facility1 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Fd_Facility2 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile : constant String := "./data/Active_Tasked_FD_Facility"; Reffile : constant String := "./data/Tasked_FD_Facility.ref"; Test_Message : constant String := "logger tasked test message"; Nr_Of_Messages : constant Natural := 10; task type Test_Log_Task (Logger : not null access Active_Logger.Instance); -- This task logs Nr_Of_Messages to the given Active logger instance. task body Test_Log_Task is begin for I in 1 .. Nr_Of_Messages loop Logger.Log_Message (Level => Debug, Msg => Test_Message); end loop; end Test_Log_Task; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Fd_Facility1.Set_Name (Name => "Fd_Facility1"); Fd_Facility1.Toggle_Write_Timestamp (State => False); Facilities.File_Descriptor.Handle (Fd_Facility1).Set_Logfile (Path => Testfile); Log.Attach_Facility (Facility => Fd_Facility1); Log.Attach_Facility (Facility => Fd_Facility2); Assert (Condition => Log.Facility_Count = 2, Message => "facility count not 2"); Log.Detach_Facility (Name => Fd_Facility2.Get_Name); Assert (Condition => Log.Facility_Count = 1, Message => "facility count not 1"); declare Logger1 : Test_Log_Task (Log'Access); begin for I in 1 .. Nr_Of_Messages loop Log.Log_Message (Level => Debug, Msg => Test_Message); end loop; end; end; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Tasked_One_FD_Facility; ------------------------------------------------------------------------- procedure Toggle_Timestamp (Facility_Handle : Facilities.Handle) is begin Facility_Handle.Toggle_Write_Timestamp (State => True); end Toggle_Timestamp; ------------------------------------------------------------------------- procedure Update_Facility is Log : aliased Active_Logger.Instance (Init => False); begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin declare Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Facility_Name : constant String := "Test_Facility"; begin Facility.Set_Name (Name => Facility_Name); Facility.Toggle_Write_Timestamp (State => False); Assert (Condition => not Facility.Is_Write_Timestamp, Message => "Could not disable Timestamp"); Log.Attach_Facility (Facility => Facility); Log.Update (Name => Facility_Name, Process => Toggle_Timestamp'Access); for I in 1 .. 30 loop exit when Facility.Is_Write_Timestamp; delay 0.1; end loop; Assert (Condition => Facility.Is_Write_Timestamp, Message => "Update failed"); end; end; end Update_Facility; ------------------------------------------------------------------------- procedure Verify_Iterate_Facilities is Log : aliased Active_Logger.Instance (Init => False); Facility1 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Facility2 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; begin declare Shutdown : Active_Logger.Shutdown_Helper (Logger => Log'Access); pragma Unreferenced (Shutdown); begin Facility1.Set_Name (Name => "Facility1"); Facility1.Set_Name (Name => "Facility2"); Log.Attach_Facility (Facility => Facility1); Log.Attach_Facility (Facility => Facility2); Log.Iterate (Process => Inc_Counter'Access); for I in 1 .. 30 loop exit when Counter /= 0; delay 0.1; end loop; Assert (Condition => Counter = 2, Message => "Counter not 2"); end; end Verify_Iterate_Facilities; ------------------------------------------------------------------------- procedure Verify_Logger_Initialization is Logger1 : aliased Active_Logger.Instance (Init => False); Logger2 : aliased Active_Logger.Instance (Init => True); begin declare Shutdown1 : Active_Logger.Shutdown_Helper (Logger => Logger1'Access); Shutdown2 : Active_Logger.Shutdown_Helper (Logger => Logger2'Access); pragma Unreferenced (Shutdown1); pragma Unreferenced (Shutdown2); begin Assert (Condition => Logger1.Facility_Count = 0, Message => "logger1 not empty"); Assert (Condition => Logger2.Facility_Count = 1, Message => "logger2 empty"); end; end Verify_Logger_Initialization; end Active_Logger_Tests; libalog-0.4.1/tests/active_logger_tests.ads000066400000000000000000000046151172144577100210330ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog active logger component. package Active_Logger_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Attach_Facility; -- Test Facility attaching. procedure Update_Facility; -- Test Facility update operation. procedure Detach_Facility_Instance; -- Test Facility detaching by name. procedure Detach_Facility_Unattached; -- Test Facility detaching of active logger with a un-attached instance. -- Verify that logger remains responsive after exception. procedure Attach_Transform; -- Test Transform attaching. procedure Detach_Transform_Instance; -- Test Transform detaching by name. procedure Detach_Transform_Unattached; -- Test Transform detaching of tasked logger with un-attached instance. -- Verify that active logger remains responsive after exception. procedure Clear_A_Logger; -- Test Logger cleanup. procedure Verify_Logger_Initialization; -- Test active logger instance initialization behavior. procedure Default_Facility_Handling; -- Test attaching/detaching of default facility. procedure Tasked_One_FD_Facility; -- Test tasked logging to active logger with one fd based facility. procedure Verify_Iterate_Facilities; -- Test iterate for facilities of active logger. procedure Task_Termination; -- Test active logger task termination. procedure Request_Queue_Length; -- Test queue length getter. end Active_Logger_Tests; libalog-0.4.1/tests/alog-facilities-mock.adb000066400000000000000000000022151172144577100207330ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA package body Alog.Facilities.Mock is ------------------------------------------------------------------------- procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String) is begin raise Constraint_Error with Exception_Message; end Write; end Alog.Facilities.Mock; libalog-0.4.1/tests/alog-facilities-mock.ads000066400000000000000000000031351172144577100207560ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- Logging facility used for testing. Raises a Constraint_Error when Write() -- is called. package Alog.Facilities.Mock is type Instance is new Alog.Facilities.Instance with private; type Handle is access all Instance; overriding procedure Write (Facility : Instance; Level : Log_Level := Info; Msg : String); -- Implementation of Write. overriding procedure Setup (Facility : in out Instance) is null; -- Implementation of Setup procedure. overriding procedure Teardown (Facility : in out Instance) is null; -- Implementation of Teardown procedure. Exception_Message : constant String := "DON'T PANIC! Test exception"; private type Instance is new Alog.Facilities.Instance with null record; end Alog.Facilities.Mock; libalog-0.4.1/tests/facility_tests-fd.adb000066400000000000000000000271421172144577100203730ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Text_IO; with Ada.Directories; with Ahven; use Ahven; with Alog.Helpers; with Alog.Log_Request; with Alog.Policy_DB; with Alog.Facilities.File_Descriptor; package body Facility_Tests.FD is use Alog; use Alog.Log_Request; use Alog.Facilities; ------------------------------------------------------------------------- procedure Dst_Loglevel_Handling is F : File_Descriptor.Instance; Testfile : constant String := "./data/Dst_Loglevel_Fd"; Reffile : constant String := "./data/Dst_Loglevel_Fd.ref"; begin F.Toggle_Write_Timestamp (State => False); F.Toggle_Write_Loglevel (State => True); F.Set_Logfile (Path => Testfile); F.Set_Name (Name => "Dst_Facility"); Policy_DB.Set_Loglevel (Identifier => "Dst_Facility", Level => Warning); F.Process (Request => Create (Level => Warning, Message => "Testmessage")); F.Process (Request => Create (Level => Info, Source => "Test", Message => "Testmessage")); F.Close_Logfile; Policy_DB.Reset; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Dst_Loglevel_Handling; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for FD Facility"); T.Add_Test_Routine (Routine => Set_Valid_Logfile_Fd'Access, Name => "set valid logfile"); T.Add_Test_Routine (Routine => Set_Invalid_Logfile_Fd'Access, Name => "set invalid logfile"); T.Add_Test_Routine (Routine => Write_Message_Fd'Access, Name => "log a fd message"); T.Add_Test_Routine (Routine => Teardown_Fd'Access, Name => "teardown fd facility"); T.Add_Test_Routine (Routine => Toggle_Write_Timestamp_Fd'Access, Name => "toggle fd timestamp writing"); T.Add_Test_Routine (Routine => Toggle_Write_Loglevel_Fd'Access, Name => "toggle fd loglevel writing"); T.Add_Test_Routine (Routine => Toggle_Write_Source_Fd'Access, Name => "toggle fd source writing"); T.Add_Test_Routine (Routine => Trim_Loglevels_Fd'Access, Name => "fd loglevel align"); T.Add_Test_Routine (Routine => Verify_Append'Access, Name => "append logic"); T.Add_Test_Routine (Routine => Dst_Loglevel_Handling'Access, Name => "destination loglevels"); end Initialize; ------------------------------------------------------------------------- procedure Set_Invalid_Logfile_Fd is F : File_Descriptor.Instance; begin F.Set_Logfile (Path => "/not-allowed.log"); Fail (Message => "expected Name_Error"); exception when File_Descriptor.Open_File_Error => null; end Set_Invalid_Logfile_Fd; ------------------------------------------------------------------------- procedure Set_Valid_Logfile_Fd is use Ada.Text_IO; F : File_Descriptor.Instance; begin F.Set_Logfile (Path => "./data/Set_Valid_Logfile"); Assert (Condition => Is_Open (F.Get_Logfile.all), Message => "could not set logfile!"); F.Close_Logfile (Remove => True); end Set_Valid_Logfile_Fd; ------------------------------------------------------------------------- procedure Teardown_Fd is use Ada.Text_IO; F : File_Descriptor.Instance; Testfile : constant String := "./data/Teardown_Fd"; begin F.Set_Logfile (Path => Testfile); Assert (Condition => Is_Open (File => F.Get_Logfile.all), Message => "could not set logfile!"); F.Teardown; Assert (Condition => not Is_Open (File => F.Get_Logfile.all), Message => "logfile still open!"); Ada.Directories.Delete_File (Name => Testfile); end Teardown_Fd; ------------------------------------------------------------------------- procedure Toggle_Write_Loglevel_Fd is F : File_Descriptor.Instance; Testfile : constant String := "./data/Toggle_Write_Loglevel_Fd"; Reffile : constant String := "./data/Toggle_Write_Loglevel_Fd.ref"; begin F.Toggle_Write_Timestamp (State => False); F.Toggle_Write_Loglevel (State => False); F.Set_Logfile (Path => Testfile); F.Process (Request => Create (Message => "This is a message without loglevel")); F.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "unable to disable"); Ada.Directories.Delete_File (Name => Testfile); end Toggle_Write_Loglevel_Fd; ------------------------------------------------------------------------- procedure Toggle_Write_Source_Fd is F : File_Descriptor.Instance; Testfile : constant String := "./data/Toggle_Write_Source_Fd"; Reffile : constant String := "./data/Toggle_Write_Source_Fd.ref"; begin F.Toggle_Write_Timestamp (State => False); F.Toggle_Write_Loglevel (State => True); F.Set_Logfile (Path => Testfile); F.Process (Request => Create (Level => Warning, Message => "No source given")); F.Process (Request => Create (Level => Info, Source => "Test", Message => "Source 'Test'")); F.Toggle_Write_Source (State => False); F.Process (Request => Create (Level => Info, Source => "Test", Message => "Source 'Test', source writing disabled")); F.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "file mismatch"); Ada.Directories.Delete_File (Name => Testfile); end Toggle_Write_Source_Fd; ------------------------------------------------------------------------- procedure Toggle_Write_Timestamp_Fd is F : File_Descriptor.Instance; Testfile : constant String := "./data/Toggle_Write_Timestamp_Fd"; Reffile : constant String := "./data/Toggle_Write_Timestamp_Fd.ref"; begin F.Toggle_Write_Timestamp (State => False); F.Set_Logfile (Path => Testfile); F.Process (Request => Create (Message => "This is a message without timestamp")); F.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "unable to disable"); Ada.Directories.Delete_File (Name => Testfile); end Toggle_Write_Timestamp_Fd; ------------------------------------------------------------------------- procedure Trim_Loglevels_Fd is F : File_Descriptor.Instance; Testfile : constant String := "./data/Trim_Loglevels_Fd"; Reffile : constant String := "./data/Trim_Loglevels_Fd.ref"; begin F.Toggle_Write_Timestamp (State => False); F.Toggle_Write_Loglevel (State => True); F.Set_Logfile (Path => Testfile); for Lvl in Alog.Log_Level loop F.Process (Request => Create (Level => Lvl, Message => "Testmessage")); end loop; F.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "alignment incorrect"); Ada.Directories.Delete_File (Name => Testfile); end Trim_Loglevels_Fd; ------------------------------------------------------------------------- procedure Verify_Append is begin Append : declare F1 : File_Descriptor.Instance; F2 : File_Descriptor.Instance; Testfile : constant String := "./data/Log_Append_Fd"; Reffile : constant String := "./data/Log_Append_Fd.ref"; begin F1.Toggle_Write_Timestamp (State => False); F1.Set_Logfile (Path => Testfile); F1.Process (Request => Create (Message => "Facility1")); F1.Close_Logfile; F2.Toggle_Write_Timestamp (State => False); F2.Set_Logfile (Path => Testfile); F2.Process (Request => Create (Message => "Facility2")); F2.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Testfile, Filename2 => Reffile), Message => "append does not work"); Ada.Directories.Delete_File (Name => Testfile); end Append; Overwrite : declare F1 : File_Descriptor.Instance; F2 : File_Descriptor.Instance; Testfile : constant String := "./data/Log_Overwrite_Fd"; Reffile : constant String := "./data/Log_Overwrite_Fd.ref"; begin F1.Toggle_Write_Timestamp (State => False); F1.Set_Logfile (Path => Testfile); F1.Process (Request => Create (Message => "Facility1")); F1.Close_Logfile; F2.Toggle_Write_Timestamp (State => False); F2.Set_Logfile (Path => Testfile, Append => False); F2.Process (Request => Create (Message => "Facility2")); F2.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Testfile, Filename2 => Reffile), Message => "overwrite does not work"); Ada.Directories.Delete_File (Name => Testfile); end Overwrite; end Verify_Append; ------------------------------------------------------------------------- procedure Write_Message_Fd is F : File_Descriptor.Instance; Testfile : constant String := "./data/Write_Message_Fd"; Reffile : constant String := "./data/Write_Message_Fd.ref"; begin -- We have to disable timestamps, since its changing all -- the time :) F.Toggle_Write_Timestamp (State => False); -- Open logfile, write test message. F.Set_Logfile (Path => Testfile); F.Process (Request => Create (Message => "This is a test log-message")); F.Close_Logfile; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Write_Message_Fd; end Facility_Tests.FD; libalog-0.4.1/tests/facility_tests-fd.ads000066400000000000000000000034361172144577100204140ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; package Facility_Tests.FD is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Set_Valid_Logfile_Fd; -- Set correct Fd test. procedure Set_Invalid_Logfile_Fd; -- Set illegal Fd test. procedure Write_Message_Fd; -- Test message writing. procedure Teardown_Fd; -- Test Facility cleanup. procedure Toggle_Write_Timestamp_Fd; -- Test the timestamp enable/disable functionality. procedure Toggle_Write_Loglevel_Fd; -- Test the loglevel enable/disable functionality. procedure Toggle_Write_Source_Fd; -- Test the source writing enable/disable functionality. procedure Trim_Loglevels_Fd; -- Test alignment of loglevels. procedure Verify_Append; -- Test set logfile append behavior. procedure Dst_Loglevel_Handling; -- Verify destination loglevel handling. end Facility_Tests.FD; libalog-0.4.1/tests/facility_tests-pgsql.adb000066400000000000000000000210671172144577100211300ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; use Ahven; with Alog.Log_Request; with Alog.Facilities.Pgsql; package body Facility_Tests.PGSQL is use Alog; use Alog.Log_Request; use Alog.Facilities; ------------------------------------------------------------------------- procedure Disable_Write_Loglevel is F : Alog.Facilities.Pgsql.Instance; State : constant Boolean := False; begin F.Toggle_Write_Loglevel (State => State); Assert (Condition => (F.Is_Write_Loglevel = State), Message => "unable to set to " & Boolean'Image (State)); F.Toggle_Write_Loglevel (State => not State); Assert (Condition => (F.Is_Write_Loglevel = not State), Message => "unable to set to " & Boolean'Image (not State)); end Disable_Write_Loglevel; ------------------------------------------------------------------------- procedure Disable_Write_Timestamp is F : Alog.Facilities.Pgsql.Instance; State : constant Boolean := False; begin F.Toggle_Write_Timestamp (State => State); Assert (Condition => (F.Is_Write_Timestamp = State), Message => "unable to set to " & Boolean'Image (State)); F.Toggle_Write_Timestamp (State => not State); Assert (Condition => (F.Is_Write_Timestamp = not State), Message => "unable to set to " & Boolean'Image (not State)); end Disable_Write_Timestamp; ------------------------------------------------------------------------- procedure Enable_SQL_Trace is F : Alog.Facilities.Pgsql.Instance; State : constant Boolean := True; begin F.Toggle_SQL_Trace (State => State); Assert (Condition => (F.Is_SQL_Trace = State), Message => "unable to set to " & Boolean'Image (State)); F.Toggle_SQL_Trace (State => not State); Assert (Condition => (F.Is_SQL_Trace = not State), Message => "unable to set to " & Boolean'Image (not State)); end Enable_SQL_Trace; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for PGSQL Facility"); T.Add_Test_Routine (Routine => Set_Host_Name'Access, Name => "set hostname"); T.Add_Test_Routine (Routine => Set_Host_Address'Access, Name => "set host address"); T.Add_Test_Routine (Routine => Set_Host_Port'Access, Name => "set host port"); T.Add_Test_Routine (Routine => Set_DB_Name'Access, Name => "set database name"); T.Add_Test_Routine (Routine => Set_Table_Name'Access, Name => "set table name"); T.Add_Test_Routine (Routine => Set_Level_Column_Name'Access, Name => "set level column name"); T.Add_Test_Routine (Routine => Set_Timestamp_Column_Name'Access, Name => "set timestamp column name"); T.Add_Test_Routine (Routine => Set_Message_Column_Name'Access, Name => "set message column name"); T.Add_Test_Routine (Routine => Set_Credentials'Access, Name => "set credentials"); T.Add_Test_Routine (Routine => Enable_SQL_Trace'Access, Name => "toggle sql trace"); T.Add_Test_Routine (Routine => Disable_Write_Timestamp'Access, Name => "toggle timestamp"); T.Add_Test_Routine (Routine => Disable_Write_Loglevel'Access, Name => "toggle loglevel"); -- T.Add_Test_Routine -- (Routine => Write_Message'Access, -- Name => "log a message to PGSQL database"); end Initialize; ------------------------------------------------------------------------- procedure Set_Credentials is F : Alog.Facilities.Pgsql.Instance; Username : constant String := "foo"; Password : constant String := "bar"; begin F.Set_Credentials (Username => Username, Password => Password); Assert (Condition => (F.Get_Credentials = Username), Message => "non matching username"); end Set_Credentials; ------------------------------------------------------------------------- procedure Set_DB_Name is F : Alog.Facilities.Pgsql.Instance; DB_Name : constant String := "FOODB"; begin F.Set_DB_Name (DB_Name); Assert (Condition => (F.Get_DB_Name = DB_Name), Message => "non matching database name"); end Set_DB_Name; ------------------------------------------------------------------------- procedure Set_Host_Address is F : Alog.Facilities.Pgsql.Instance; Host_Address : constant String := "127.0.0.1"; begin F.Set_Host_Address (Host_Address); end Set_Host_Address; ------------------------------------------------------------------------- procedure Set_Host_Name is F : Alog.Facilities.Pgsql.Instance; Hostname : constant String := "foohost"; begin F.Set_Host_Name (Hostname); Assert (Condition => (F.Get_Host_Name = Hostname), Message => "non matching hostname"); end Set_Host_Name; ------------------------------------------------------------------------- procedure Set_Host_Port is F : Alog.Facilities.Pgsql.Instance; Host_Port : constant Natural := 1024; begin F.Set_Host_Port (Host_Port); Assert (Condition => (F.Get_Host_Port = Host_Port), Message => "non matching host port"); end Set_Host_Port; ------------------------------------------------------------------------- procedure Set_Level_Column_Name is F : Alog.Facilities.Pgsql.Instance; Level_Column_Name : constant String := "foocolumn"; begin F.Set_Level_Column_Name (Level_Column_Name); Assert (Condition => (F.Get_Level_Column_Name = Level_Column_Name), Message => "non matching level column name"); end Set_Level_Column_Name; ------------------------------------------------------------------------- procedure Set_Message_Column_Name is F : Alog.Facilities.Pgsql.Instance; Message_Column_Name : constant String := "foobarcolumn"; begin F.Set_Message_Column_Name (Message_Column_Name); Assert (Condition => (F.Get_Message_Column_Name = Message_Column_Name), Message => "non matching message column name"); end Set_Message_Column_Name; ------------------------------------------------------------------------- procedure Set_Table_Name is F : Alog.Facilities.Pgsql.Instance; Table_Name : constant String := "footable"; begin F.Set_Table_Name (Table_Name); Assert (Condition => (F.Get_Table_Name = Table_Name), Message => "non matching table name"); end Set_Table_Name; ------------------------------------------------------------------------- procedure Set_Timestamp_Column_Name is F : Alog.Facilities.Pgsql.Instance; Timestamp_Column_Name : constant String := "barcolumn"; begin F.Set_Timestamp_Column_Name (Timestamp_Column_Name); Assert (Condition => (F.Get_Timestamp_Column_Name = Timestamp_Column_Name), Message => "non matching timestamp column name"); end Set_Timestamp_Column_Name; ------------------------------------------------------------------------- procedure Write_Message is F : Alog.Facilities.Pgsql.Instance; begin F.Toggle_Write_Timestamp (State => False); F.Set_DB_Name (DB_Name => "alog"); F.Set_Credentials (Username => "alog", Password => "foobar"); -- Setup facility (open db connection, etc) F.Setup; F.Process (Request => Create (Message => "Test message")); F.Teardown; end Write_Message; end Facility_Tests.PGSQL; libalog-0.4.1/tests/facility_tests-pgsql.ads000066400000000000000000000037211172144577100211460ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; package Facility_Tests.PGSQL is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Set_Host_Name; -- Test set/get Host_Name. procedure Set_Host_Address; -- Test set Host_Address. procedure Set_Host_Port; -- Test set/get Host_Port. procedure Set_DB_Name; -- Test set/get DB_Name. procedure Set_Table_Name; -- Test set/get Table_Name. procedure Set_Level_Column_Name; -- Test set/get Level_Column_Name. procedure Set_Timestamp_Column_Name; -- Test set/get Timestamp_Column_Name. procedure Set_Message_Column_Name; -- Test set/get Message_Column_Name. procedure Set_Credentials; -- Test set/get Credentials. procedure Enable_SQL_Trace; -- Test the sql trace enable/disable functionality. procedure Disable_Write_Timestamp; -- Test the timestamp enable/disable functionality. procedure Disable_Write_Loglevel; -- Test the loglevel enable/disable functionality. procedure Write_Message; -- Test message writing. end Facility_Tests.PGSQL; libalog-0.4.1/tests/facility_tests-smtp.adb000066400000000000000000000071351172144577100207650ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; use Ahven; with Alog.Log_Request; with Alog.Facilities.SMTP; package body Facility_Tests.SMTP is use Alog; use Alog.Log_Request; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for SMTP Facility"); T.Add_Test_Routine (Routine => Send_No_Recipient'Access, Name => "send with no recipient"); T.Add_Test_Routine (Routine => Send_No_Server'Access, Name => "send with no server"); T.Add_Test_Routine (Routine => Set_Header'Access, Name => "set message header"); -- T.Add_Test_Routine -- (Routine => Send_Simple_Mail'Access, -- Name => "send simple mail"); end Initialize; ------------------------------------------------------------------------- procedure Send_No_Recipient is F : Alog.Facilities.SMTP.Instance; begin -- Try to send a log-message with no recipient specified first, should -- raise No_Recipient exception. F.Process (Request => Create (Level => Debug, Message => "this should not work")); Fail (Message => "exception not thrown"); exception when Alog.Facilities.SMTP.No_Recipient => null; end Send_No_Recipient; ------------------------------------------------------------------------- procedure Send_No_Server is F : Alog.Facilities.SMTP.Instance; begin F.Set_Recipient (Name => "Send_No_Server", EMail => "Testcase"); -- Try to send a log-message with no server specified first, should -- raise No_Server exception. F.Process (Request => Create (Level => Debug, Message => "this should not work")); Fail (Message => "exception not thrown"); exception when Alog.Facilities.SMTP.No_Server => null; end Send_No_Server; ------------------------------------------------------------------------- procedure Send_Simple_Mail is F : Alog.Facilities.SMTP.Instance; begin F.Set_Recipient (Name => "Facility-Test", EMail => "test@example.ch"); F.Set_Server (Name => "mta.example.ch"); F.Process (Request => Create (Level => Debug, Message => "Testmessage")); end Send_Simple_Mail; ------------------------------------------------------------------------- procedure Set_Header is F : Alog.Facilities.SMTP.Instance; H : constant String := "Expected Header"; begin F.Set_Header (Header => H); Assert (Condition => F.Get_Header = H, Message => "headers not equal"); end Set_Header; end Facility_Tests.SMTP; libalog-0.4.1/tests/facility_tests-smtp.ads000066400000000000000000000025651172144577100210100ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog facility components. package Facility_Tests.SMTP is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Send_No_Recipient; -- Test sending mail with no recipient specified. procedure Send_No_Server; -- Test sending mail with no server specified. procedure Send_Simple_Mail; -- Test mail sending facility. procedure Set_Header; -- Test Message-Header setter. end Facility_Tests.SMTP; libalog-0.4.1/tests/facility_tests-syslog.adb000066400000000000000000000034351172144577100213210ustar00rootroot00000000000000-- -- Copyright (c) 2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; with Alog.Facilities.Syslog; package body Facility_Tests.Syslog is use Ahven; package FS renames Alog.Facilities.Syslog; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for syslog Facility"); T.Add_Test_Routine (Routine => Set_Syslog_Origin'Access, Name => "set/get origin"); end Initialize; ------------------------------------------------------------------------- procedure Set_Syslog_Origin is use type Alog.Facilities.Syslog.Syslog_Origin; F : FS.Instance; begin Assert (Condition => F.Get_Origin = FS.LOG_USER, Message => "Default origin not LOG_USER"); F.Set_Origin (Value => FS.LOG_MAIL); Assert (Condition => F.Get_Origin = FS.LOG_MAIL, Message => "Origin not LOG_MAIL"); end Set_Syslog_Origin; end Facility_Tests.Syslog; libalog-0.4.1/tests/facility_tests-syslog.ads000066400000000000000000000021631172144577100213370ustar00rootroot00000000000000-- -- Copyright (c) 2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; package Facility_Tests.Syslog is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Set_Syslog_Origin; -- Test syslog origin setter/getter. end Facility_Tests.Syslog; libalog-0.4.1/tests/facility_tests-xmpp.adb000066400000000000000000000100361172144577100207600ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; use Ahven; with Alog.Log_Request; with Alog.Facilities.XMPP; package body Facility_Tests.XMPP is use Alog; use Alog.Log_Request; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for XMPP Facility"); T.Add_Test_Routine (Routine => Send_No_Sender'Access, Name => "send with no sender"); T.Add_Test_Routine (Routine => Send_No_Recipient'Access, Name => "send with no recipient"); T.Add_Test_Routine (Routine => Send_No_Server'Access, Name => "send with no server"); -- T.Add_Test_Routine -- (Routine => Send_XMPP_Message'Access, -- Name => "send XMPP message"); end Initialize; ------------------------------------------------------------------------- procedure Send_No_Recipient is F : Alog.Facilities.XMPP.Instance; begin F.Set_Sender (JID => "alog@localhost", Password => "foobar"); -- Try to send a log-message with no recipient specified first, should -- raise No_Recipient exception. F.Process (Request => Create (Level => Debug, Message => "this should not work")); Fail (Message => "Expected No_Recipient exception"); exception when Alog.Facilities.XMPP.No_Recipient => null; end Send_No_Recipient; ------------------------------------------------------------------------- procedure Send_No_Sender is F : Alog.Facilities.XMPP.Instance; begin -- Try to send a log-message with no recipient specified first, should -- raise No_Recipient exception. F.Process (Request => Create (Level => Debug, Message => "this should not work")); Fail (Message => "Expected No_Sender exception"); exception when Alog.Facilities.XMPP.No_Sender => null; end Send_No_Sender; ------------------------------------------------------------------------- procedure Send_No_Server is F : Alog.Facilities.XMPP.Instance; begin F.Set_Sender (JID => "alog@localhost", Password => "foobar"); F.Set_Recipient (JID => "recipient@localhost"); -- Try to send a log-message with no server specified first, should -- raise No_Server exception. F.Process (Request => Create (Level => Debug, Message => "this should not work")); Fail (Message => "Expected No_Server exception"); exception when Alog.Facilities.XMPP.No_Server => null; end Send_No_Server; ------------------------------------------------------------------------- procedure Send_XMPP_Message is F : Alog.Facilities.XMPP.Instance; begin F.Set_Sender (JID => "alog@localhost", Password => "foobar"); F.Set_Recipient (JID => "recipient@localhost"); F.Set_Server (Name => "localhost"); F.Process (Request => Create (Level => Debug, Message => "This is a test message from Alog!")); end Send_XMPP_Message; end Facility_Tests.XMPP; libalog-0.4.1/tests/facility_tests-xmpp.ads000066400000000000000000000026141172144577100210040ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog XMPP facility. package Facility_Tests.XMPP is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Send_No_Sender; -- Test sending message with no sender specified. procedure Send_No_Recipient; -- Test sending message with no recipient specified. procedure Send_No_Server; -- Test sending message with no server specified. procedure Send_XMPP_Message; -- Test sending XMPP message. end Facility_Tests.XMPP; libalog-0.4.1/tests/facility_tests.adb000066400000000000000000000120471172144577100200020ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Calendar.Time_Zones; with Ahven; use Ahven; with Alog.Facilities.File_Descriptor; package body Facility_Tests is use Alog; use Alog.Facilities; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for Facilites"); T.Add_Test_Routine (Routine => Set_Name'Access, Name => "set facility name"); T.Add_Test_Routine (Routine => Toggle_Loglevel'Access, Name => "toggle loglevel"); T.Add_Test_Routine (Routine => Toggle_Timestamp'Access, Name => "toggle timestamp"); T.Add_Test_Routine (Routine => Toggle_UTC_Timestamp'Access, Name => "toggle UTC timestamp"); T.Add_Test_Routine (Routine => Toggle_Source'Access, Name => "toggle source writing"); T.Add_Test_Routine (Routine => Timestamp_Creation'Access, Name => "timestamp creation"); end Initialize; ------------------------------------------------------------------------- procedure Set_Name is F : File_Descriptor.Instance; Expected : constant String := "TEST"; begin F.Set_Name (Name => Expected); Assert (Condition => F.Get_Name = Expected, Message => "name not equal"); end Set_Name; ------------------------------------------------------------------------- procedure Timestamp_Creation is use Ada.Calendar; use Ada.Calendar.Time_Zones; F : File_Descriptor.Instance; Ref_Time : constant Time := Time_Of (Year => 2009, Month => 10, Day => 10, Seconds => 7255.0); Ref_Stamp : constant String := "Oct 10 2009 02:00:55"; -- Adding the UTC time offset to the reference time should lead to the -- same timestamp string when UTC timestamps are enabled since UTC time -- is timezone-dependent time minus the UTC offset at that given time. Ref_UTC_Time : constant Time := Ref_Time + Duration (UTC_Time_Offset (Ref_Time)) * 60; begin Assert (Condition => Ref_Stamp = F.Get_Timestamp (Time => Ref_Time), Message => "Timestamp mismatch"); F.Toggle_UTC_Timestamp (State => True); Assert (Condition => F.Get_Timestamp (Time => Ref_UTC_Time) = Ref_Stamp, Message => "UTC timestamp mismatch!"); end Timestamp_Creation; ------------------------------------------------------------------------- procedure Toggle_Loglevel is F : File_Descriptor.Instance; begin Assert (Condition => not F.Is_Write_Loglevel, Message => "Loglevel writing is 'True' by default"); F.Toggle_Write_Loglevel (State => True); Assert (Condition => F.Is_Write_Loglevel, Message => "Loglevel writing not 'True'"); end Toggle_Loglevel; ------------------------------------------------------------------------- procedure Toggle_Source is F : File_Descriptor.Instance; begin Assert (Condition => F.Is_Write_Source, Message => "Source writing is 'False' by default"); F.Toggle_Write_Source (State => False); Assert (Condition => not F.Is_Write_Source, Message => "Source writing is still 'True'"); end Toggle_Source; ------------------------------------------------------------------------- procedure Toggle_Timestamp is F : File_Descriptor.Instance; begin Assert (Condition => F.Is_Write_Timestamp, Message => "Timestamp writing is 'False' by default"); F.Toggle_Write_Timestamp (State => False); Assert (Condition => not F.Is_Write_Timestamp, Message => "Timestamp writing not 'False'"); end Toggle_Timestamp; ------------------------------------------------------------------------- procedure Toggle_UTC_Timestamp is F : File_Descriptor.Instance; begin Assert (Condition => not F.Is_UTC_Timestamp, Message => "Default should be 'False'"); F.Toggle_UTC_Timestamp (State => True); Assert (Condition => F.Is_UTC_Timestamp, Message => "Expected 'True'"); end Toggle_UTC_Timestamp; end Facility_Tests; libalog-0.4.1/tests/facility_tests.ads000066400000000000000000000030141172144577100200150ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog facility components. package Facility_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Set_Name; -- Set name of Facility test. procedure Toggle_Loglevel; -- Test loglevel-writing related procedures. procedure Toggle_Timestamp; -- Test timestamp-writing related procedures. procedure Toggle_UTC_Timestamp; -- Test enabling/disabling UTC timestamps. procedure Toggle_Source; -- Test enabling/disabling source writing. procedure Timestamp_Creation; -- Test timestamp string creation. end Facility_Tests; libalog-0.4.1/tests/helper_tests.adb000066400000000000000000000126251172144577100174570ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; with Alog.Helpers; with Alog.Maps; package body Helper_Tests is use Ahven; use Alog; use Alog.Helpers; ------------------------------------------------------------------------- procedure Compare_Files is File1 : constant String := "./data/ref_file1"; File2 : constant String := "./data/ref_file2"; File3 : constant String := "./data/ref_file3"; File4 : constant String := "./data/ref_file4"; begin Assert (Condition => Assert_Files_Equal (Filename1 => File1, Filename2 => File2), Message => "files should be equal"); Assert (Condition => not Assert_Files_Equal (Filename1 => File1, Filename2 => File3), Message => "files should not be equal"); Assert (Condition => not Assert_Files_Equal (Filename1 => File1, Filename2 => File4), Message => "filesize should not be equal"); end Compare_Files; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for helpers"); T.Add_Test_Routine (Routine => Compare_Files'Access, Name => "test file equality helper"); T.Add_Test_Routine (Routine => Read_Config'Access, Name => "read loglevel config file"); T.Add_Test_Routine (Routine => Read_Config_Nodefault'Access, Name => "read config without default loglevel"); T.Add_Test_Routine (Routine => Read_Config_Invalid_Loglevel'Access, Name => "read config with invalid loglevel"); T.Add_Test_Routine (Routine => Read_Invalid_Config'Access, Name => "read invalid config"); end Initialize; ------------------------------------------------------------------------- procedure Read_Config is Config_File : constant String := "./data/Loglevel_Config.ref"; Default_Level : Log_Level := Debug; Ident_Map : Maps.Wildcard_Level_Map; begin Read_Loglevels (Filename => Config_File, Default_Level => Default_Level, Identifiers => Ident_Map); Assert (Condition => Default_Level = Info, Message => "default loglevel mismatch"); Assert (Condition => Ident_Map.Element (Key => "Foo.*") = Debug, Message => "Foo.* mismatch"); Assert (Condition => Ident_Map.Element (Key => "Foo.Bar") = Alert, Message => "Foo.Bar mismatch"); Assert (Condition => Ident_Map.Element (Key => "Foo.Foo") = Notice, Message => "Foo.Foo mismatch"); end Read_Config; ------------------------------------------------------------------------- procedure Read_Config_Invalid_Loglevel is Config_File : constant String := "./data/Loglevel_Config_Invalid1.ref"; Default_Level : Log_Level := Debug; Ident_Map : Maps.Wildcard_Level_Map; begin Read_Loglevels (Filename => Config_File, Default_Level => Default_Level, Identifiers => Ident_Map); Fail (Message => "expected Invalid_Config"); exception when Invalid_Config => null; end Read_Config_Invalid_Loglevel; ------------------------------------------------------------------------- procedure Read_Config_Nodefault is Config_File : constant String := "./data/Loglevel_Config_Nodef.ref"; Default_Level : Log_Level := Debug; Ident_Map : Maps.Wildcard_Level_Map; begin Read_Loglevels (Filename => Config_File, Default_Level => Default_Level, Identifiers => Ident_Map); Assert (Condition => Default_Level = Debug, Message => "default loglevel changed"); Assert (Condition => Ident_Map.Element (Key => "Foo.*") = Debug, Message => "Foo.* mismatch"); end Read_Config_Nodefault; ------------------------------------------------------------------------- procedure Read_Invalid_Config is Config_File : constant String := "./data/Loglevel_Config_Invalid2.ref"; Default_Level : Log_Level := Debug; Ident_Map : Maps.Wildcard_Level_Map; begin Read_Loglevels (Filename => Config_File, Default_Level => Default_Level, Identifiers => Ident_Map); Fail (Message => "expected Invalid_Config"); exception when Invalid_Config => null; end Read_Invalid_Config; end Helper_Tests; libalog-0.4.1/tests/helper_tests.ads000066400000000000000000000027511172144577100174770ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog helpers. package Helper_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Compare_Files; -- Verify Assert_Files_Equal helper function. procedure Read_Config; -- Verify configuration file loading. procedure Read_Config_Nodefault; -- Read a loglevel config file without default loglevel line. procedure Read_Config_Invalid_Loglevel; -- Try to read a loglevel config file with invalid loglevel. procedure Read_Invalid_Config; -- Try to read an invalid config file. end Helper_Tests; libalog-0.4.1/tests/log_request_tests.adb000066400000000000000000000052031172144577100205230ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Task_Identification; with Ahven; use Ahven; with Alog.Log_Request; package body Log_Request_Tests is use Alog; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for log requests"); T.Add_Test_Routine (Routine => Log_Request_Getter'Access, Name => "log request getters"); end Initialize; ------------------------------------------------------------------------- procedure Log_Request_Getter is use Ada.Task_Identification; Request : Log_Request.Instance; Ref_ID : constant Task_Id := Current_Task; Ref_Src : constant String := "Foo"; Ref_Msg : constant String := "Some log message"; begin Assert (Condition => Request.Get_Caller_ID = Null_Task_Id, Message => "Default ID not Null_Task_Id"); Assert (Condition => Request.Get_Log_Level = Info, Message => "Default log level not INFO"); Assert (Condition => Request.Get_Message = "", Message => "Default message not empty"); Request := Log_Request.Create (ID => Ref_ID, Source => Ref_Src, Level => Notice, Message => Ref_Msg); Assert (Condition => Request.Get_Caller_ID = Ref_ID, Message => "Caller ID mismatch"); Assert (Condition => Request.Get_Source = Ref_Src, Message => "Source mismatch"); Assert (Condition => Request.Get_Log_Level = Notice, Message => "Log level mismatch"); Assert (Condition => Request.Get_Message = Ref_Msg, Message => "Message mismatch"); end Log_Request_Getter; end Log_Request_Tests; libalog-0.4.1/tests/log_request_tests.ads000066400000000000000000000022161172144577100205450ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog log requests. package Log_Request_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Log_Request_Getter; -- Test log request getter functions. end Log_Request_Tests; libalog-0.4.1/tests/logger_tests.adb000066400000000000000000000524441172144577100174620ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Directories; with Ahven; with Alog.Helpers; with Alog.Logger; with Alog.Facilities.File_Descriptor; with Alog.Facilities.Syslog; with Alog.Transforms.Casing; package body Logger_Tests is use Ahven; use Alog; ------------------------------------------------------------------------- procedure Attach_Facility is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; procedure Check_Facility (Facility_Handle : Facilities.Handle); -- Verify that facility with given name is present in the logger. procedure Check_Facility (Facility_Handle : Facilities.Handle) is use type Facilities.Handle; begin Assert (Condition => Facility_Handle = Facility, Message => "facility mismatch"); end Check_Facility; begin Assert (Condition => Log.Facility_Count = 0, Message => "facility count not 0"); begin Log.Update (Name => Facility.Get_Name, Process => Check_Facility'Access); exception when Logger.Facility_Not_Found => null; end; Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "could not attach facility"); Log.Update (Name => Facility.Get_Name, Process => Check_Facility'Access); begin Log.Attach_Facility (Facility => Facility); Fail (Message => "attached duplicate facility"); exception when Logger.Facility_Already_Present => null; end; end Attach_Facility; ------------------------------------------------------------------------- procedure Attach_Transform is Log : Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; procedure Check_Transform (Transform_Handle : Transforms.Handle); -- Verify that transformy with given name is present in the logger. procedure Check_Transform (Transform_Handle : Transforms.Handle) is use type Transforms.Handle; begin Assert (Condition => Transform_Handle = Transform, Message => "transform mismatch"); end Check_Transform; begin Assert (Condition => Log.Transform_Count = 0, Message => "transform count not 0"); begin Log.Update (Name => Transform.Get_Name, Process => Check_Transform'Access); exception when Logger.Transform_Not_Found => null; end; Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach transform"); Log.Update (Name => Transform.Get_Name, Process => Check_Transform'Access); begin Log.Attach_Transform (Transform => Transform); Fail (Message => "attached duplicate transform"); exception when Logger.Transform_Already_Present => null; end; end Attach_Transform; ------------------------------------------------------------------------- procedure Clear_A_Logger is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Transform : constant Transforms.Handle := new Transforms.Casing.Instance; begin Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "could not attach facility"); Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach transform"); Log.Clear; Assert (Condition => Log.Facility_Count = 0, Message => "facility count is not 0"); Assert (Condition => Log.Transform_Count = 0, Message => "transform count is not 0"); end Clear_A_Logger; ------------------------------------------------------------------------- procedure Default_Facility_Handling is Logger1 : Logger.Instance (Init => False); Logger2 : Logger.Instance (Init => True); begin Logger1.Attach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 1, Message => "Unable to attach facility"); Logger1.Attach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 1, Message => "Attached facility twice"); Logger1.Log_Message (Level => Debug, Msg => "Testing default logger"); Logger1.Detach_Default_Facility; Assert (Condition => Logger1.Facility_Count = 0, Message => "Unable to detach facility"); Logger2.Attach_Default_Facility; Assert (Condition => Logger2.Facility_Count = 1, Message => "Attached facility to initialized logger"); Logger2.Detach_Default_Facility; Assert (Condition => Logger2.Facility_Count = 0, Message => "Unable to detach facility from logger"); end Default_Facility_Handling; ------------------------------------------------------------------------- procedure Detach_Facility_Instance is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.Syslog.Instance; begin Facility.Set_Name ("Syslog_Facility"); Log.Attach_Facility (Facility => Facility); Assert (Condition => Log.Facility_Count = 1, Message => "could not attach"); Log.Detach_Facility (Name => Facility.Get_Name); Assert (Condition => Log.Facility_Count = 0, Message => "could not detach"); end Detach_Facility_Instance; ------------------------------------------------------------------------- procedure Detach_Facility_Unattached is Log : Logger.Instance (Init => False); Facility : Facilities.Handle := new Facilities.Syslog.Instance; begin Facility.Set_Name ("Syslog_Facility"); Log.Detach_Facility (Name => Facility.Get_Name); Fail (Message => "could detach unattached facility"); exception when Logger.Facility_Not_Found => -- Free not attached facility, this is not done by the logger (since -- it was never attached). Alog.Logger.Free (Facility); -- Test passed. end Detach_Facility_Unattached; ------------------------------------------------------------------------- procedure Detach_Transform_Instance is Log : Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; begin Transform.Set_Name ("Casing_Transform"); Log.Attach_Transform (Transform => Transform); Assert (Condition => Log.Transform_Count = 1, Message => "could not attach"); Log.Detach_Transform (Name => Transform.Get_Name); Assert (Condition => Log.Transform_Count = 0, Message => "could not detach"); end Detach_Transform_Instance; ------------------------------------------------------------------------- procedure Detach_Transform_Unattached is Log : Logger.Instance (Init => False); Transform : Transforms.Handle := new Transforms.Casing.Instance; begin Transform.Set_Name ("Casing_Transform"); Log.Detach_Transform (Name => Transform.Get_Name); Fail (Message => "could detach unattached transform"); exception when Logger.Transform_Not_Found => -- Free not attached Transform, this is not done by the logger (since -- it was never attached). Alog.Logger.Free (Transform); -- Test passed. end Detach_Transform_Unattached; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for Logger"); T.Add_Test_Routine (Routine => Attach_Facility'Access, Name => "attach a facility"); T.Add_Test_Routine (Routine => Update_Facility'Access, Name => "update a facility"); T.Add_Test_Routine (Routine => Detach_Facility_Instance'Access, Name => "detach facility"); T.Add_Test_Routine (Routine => Detach_Facility_Unattached'Access, Name => "detach not attached facility"); T.Add_Test_Routine (Routine => Attach_Transform'Access, Name => "attach a transform"); T.Add_Test_Routine (Routine => Update_Transform'Access, Name => "update a transform"); T.Add_Test_Routine (Routine => Detach_Transform_Instance'Access, Name => "detach transform"); T.Add_Test_Routine (Routine => Detach_Transform_Unattached'Access, Name => "detach not attached transform"); T.Add_Test_Routine (Routine => Clear_A_Logger'Access, Name => "clear logger"); T.Add_Test_Routine (Routine => Log_One_FD_Facility'Access, Name => "log to one fd facility"); T.Add_Test_Routine (Routine => Log_Multiple_FD_Facilities'Access, Name => "log to multiple fd facilities"); T.Add_Test_Routine (Routine => Log_FD_Facility_with_Transform'Access, Name => "log to fd facility with lowercase transform"); T.Add_Test_Routine (Routine => Verify_Logger_Initialization'Access, Name => "logger initialization behavior"); T.Add_Test_Routine (Routine => Default_Facility_Handling'Access, Name => "default facility handling"); T.Add_Test_Routine (Routine => Source_Based_Logging'Access, Name => "source based logging"); T.Add_Test_Routine (Routine => Loglevel_Handling'Access, Name => "loglevel handling"); end Initialize; ------------------------------------------------------------------------- procedure Log_FD_Facility_with_Transform is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Transform : constant Transforms.Handle := new Transforms.Casing.Instance; Testfile : constant String := "./data/Log_FD_Facility_Lowercase"; Reffile : constant String := "./data/Log_FD_Facility_Lowercase.ref"; begin Facility.Toggle_Write_Timestamp (State => False); -- Call facility fd specific procedures. Facilities.File_Descriptor.Handle (Facility).Set_Logfile (Testfile); -- Call casing transform specific procedures. Transforms.Casing.Handle (Transform).Set_Name ("lowercase"); Log.Attach_Facility (Facility => Facility); Log.Attach_Transform (Transform => Transform); Log.Log_Message (Level => Debug, Msg => "Logger Test Message, " & "FD Facility With Lowercase Transform"); Log.Clear; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Log_FD_Facility_with_Transform; ------------------------------------------------------------------------- procedure Log_Multiple_FD_Facilities is Log : Logger.Instance (Init => False); Facility1 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile1 : constant String := "./data/Log_Multiple_FD_Facilities1"; Reffile : constant String := "./data/Log_Multiple_FD_Facilities.ref"; Facility2 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile2 : constant String := "./data/Log_Multiple_FD_Facilities2"; begin -- Set facility parameters. Facility1.Set_Name (Name => "Facility1"); Facility1.Toggle_Write_Timestamp (State => False); Facility1.Toggle_Write_Loglevel (State => True); Facility2.Set_Name (Name => "Facility2"); Facility2.Toggle_Write_Timestamp (State => False); Facility2.Toggle_Write_Loglevel (State => True); -- Call facility fd specific procedures. Facilities.File_Descriptor.Handle (Facility1).Set_Logfile (Testfile1); Facilities.File_Descriptor.Handle (Facility2).Set_Logfile (Testfile2); -- Attach both facilities to logger instance. Log.Attach_Facility (Facility => Facility1); Log.Attach_Facility (Facility => Facility2); -- Log two messages. Log.Log_Message (Level => Debug, Msg => "Logger testmessage, multiple facilities"); Log.Log_Message (Level => Info, Msg => "Logger testmessage, multiple facilities"); Log.Clear; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile1), Message => "file1 not equal"); Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile2), Message => "file2 not equal"); Ada.Directories.Delete_File (Name => Testfile1); Ada.Directories.Delete_File (Name => Testfile2); end Log_Multiple_FD_Facilities; ------------------------------------------------------------------------- procedure Log_One_FD_Facility is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile : constant String := "./data/Log_One_FD_Facility"; Reffile : constant String := "./data/Log_One_FD_Facility.ref"; begin Facility.Toggle_Write_Timestamp (State => False); -- Call facility fd specific procedures. Facilities.File_Descriptor.Handle (Facility).Set_Logfile (Testfile); Log.Attach_Facility (Facility => Facility); Log.Log_Message (Level => Debug, Msg => "Logger testmessage, one fd facility"); Log.Clear; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Log_One_FD_Facility; ------------------------------------------------------------------------- procedure Loglevel_Handling is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile : constant String := "./data/Logger_Loglevel"; Reffile : constant String := "./data/Logger_Loglevel.ref"; begin Facility.Toggle_Write_Timestamp (State => False); Facility.Toggle_Write_Loglevel (State => True); -- Call facility fd specific procedures. Facilities.File_Descriptor.Handle (Facility).Set_Logfile (Testfile); Log.Attach_Facility (Facility => Facility); Log.Log_Message (Level => Debug, Msg => "Debug message (logged)"); Log.Log_Message (Level => Notice, Msg => "Notice message (logged)"); Log.Clear; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "Files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Loglevel_Handling; ------------------------------------------------------------------------- procedure Source_Based_Logging is Log : Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Testfile : constant String := "./data/Log_Source_Loglevel"; Reffile : constant String := "./data/Log_Source_Loglevel.ref"; begin Facility.Toggle_Write_Timestamp (State => False); Facility.Toggle_Write_Loglevel (State => True); Facilities.File_Descriptor.Handle (Facility).Set_Logfile (Testfile); Log.Attach_Facility (Facility => Facility); Log.Log_Message (Source => "Test", Level => Info, Msg => "Source test (logged)"); Log.Log_Message (Level => Debug, Msg => "Default source (logged)"); Log.Log_Message (Source => "Unknown", Level => Notice, Msg => "Unknown source (logged)"); Log.Clear; Assert (Condition => Helpers.Assert_Files_Equal (Filename1 => Reffile, Filename2 => Testfile), Message => "Files not equal"); Ada.Directories.Delete_File (Name => Testfile); end Source_Based_Logging; ------------------------------------------------------------------------- procedure Update_Facility is procedure Do_Nothing (Facility_Handle : Facilities.Handle) is null; -- Just do nothing. Log : Logger.Instance (Init => False); begin begin Log.Update (Name => "Nonexistent", Process => Do_Nothing'Access); Fail (Message => "Expected Facility_Not_Found"); exception when Logger.Facility_Not_Found => null; end; declare Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Facility_Name : constant String := "Test_Facility"; procedure Update_Facility (Facility_Handle : Facilities.Handle); -- Set the facility's write timestamp flag to True. procedure Update_Facility (Facility_Handle : Facilities.Handle) is begin Facility_Handle.Toggle_Write_Timestamp (State => True); end Update_Facility; begin Facility.Set_Name (Name => Facility_Name); Facility.Toggle_Write_Timestamp (State => False); Assert (Condition => not Facility.Is_Write_Timestamp, Message => "Could not disable Timestamp"); Log.Attach_Facility (Facility => Facility); Log.Update (Name => Facility_Name, Process => Update_Facility'Access); Assert (Condition => Facility.Is_Write_Timestamp, Message => "Update failed"); end; end Update_Facility; ------------------------------------------------------------------------- procedure Update_Transform is procedure Do_Nothing (Transform_Handle : Transforms.Handle) is null; -- Just do nothing. Log : Logger.Instance (Init => False); begin begin Log.Update (Name => "Nonexistent", Process => Do_Nothing'Access); Fail (Message => "Expected Transform_Not_Found"); exception when Logger.Transform_Not_Found => null; end; declare Transform : constant Transforms.Handle := new Transforms.Casing.Instance; Transform_Name : constant String := "Test_Transform"; Suffix : constant String := "_Updated"; procedure Update_Transform (Transform_Handle : Transforms.Handle); -- Set the transform's name to a test string. procedure Update_Transform (Transform_Handle : Transforms.Handle) is begin Transform_Handle.Set_Name (Name => Transform_Name & Suffix); end Update_Transform; begin Transform.Set_Name (Name => Transform_Name); Assert (Condition => Transform.Get_Name = Transform_Name, Message => "Transform name mismatch"); Log.Attach_Transform (Transform => Transform); Log.Update (Name => Transform_Name, Process => Update_Transform'Access); Assert (Condition => Transform.Get_Name = Transform_Name & Suffix, Message => "Transform update failed"); end; end Update_Transform; ------------------------------------------------------------------------- procedure Verify_Logger_Initialization is Logger1 : Logger.Instance (Init => False); Logger2 : Logger.Instance (Init => True); begin Assert (Condition => Logger1.Facility_Count = 0, Message => "logger1 not empty"); Assert (Condition => Logger2.Facility_Count = 1, Message => "logger2 empty"); end Verify_Logger_Initialization; end Logger_Tests; libalog-0.4.1/tests/logger_tests.ads000066400000000000000000000045711172144577100175010ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog logger component. package Logger_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Attach_Facility; -- Test Facility attaching. procedure Update_Facility; -- Test Facility update operation. procedure Detach_Facility_Instance; -- Test Facility detaching by name. procedure Detach_Facility_Unattached; -- Test Facility detaching with a un-attached instance -- (should fail). procedure Attach_Transform; -- Test Transform attaching. procedure Update_Transform; -- Test Transform update operation. procedure Detach_Transform_Instance; -- Test Transform detaching by name. procedure Detach_Transform_Unattached; -- Test Transform detaching with un-attached instance procedure Clear_A_Logger; -- Test Logger cleanup. procedure Log_One_FD_Facility; -- Test logging to one fd based facility. procedure Log_Multiple_FD_Facilities; -- Test logging to multiple fd based facilities. procedure Log_FD_Facility_with_Transform; -- Test logging to fd based facility with lowercase transform. procedure Verify_Logger_Initialization; -- Test logger instance initialization behavior. procedure Default_Facility_Handling; -- Test attaching/detaching of default facility. procedure Source_Based_Logging; -- Test per-source loglevel handling. procedure Loglevel_Handling; -- Test loglevel handling. end Logger_Tests; libalog-0.4.1/tests/maps_tests.adb000066400000000000000000000126451172144577100171420ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; use Ahven; with Alog.Maps; package body Maps_Tests is use Alog; ------------------------------------------------------------------------- procedure Clear_Map is Map : Maps.Wildcard_Level_Map; begin Map.Insert (Key => "Foo", Item => Debug); Map.Insert (Key => "Bar", Item => Warning); Assert (Condition => Map.Length = 2, Message => "Count not 2"); Map.Clear; Assert (Condition => Map.Length = 0, Message => "Count not 0"); end Clear_Map; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for maps"); T.Add_Test_Routine (Routine => Insert_Elements'Access, Name => "Insert elements"); T.Add_Test_Routine (Routine => Update_Element'Access, Name => "Update element"); T.Add_Test_Routine (Routine => Wildcard_Lookup'Access, Name => "Wildcard lookup"); end Initialize; ------------------------------------------------------------------------- procedure Insert_Elements is use type Maps.Cursor; Map : Maps.Wildcard_Level_Map; begin Map.Insert (Key => "Foo", Item => Debug); Assert (Condition => Map.Length = 1, Message => "Count not 1"); Assert (Condition => Map.Element (Key => "Foo") = Debug, Message => "Loglevel mismatch for key Foo"); declare Position : Maps.Cursor; begin Position := Map.Find (Key => "Foo"); Assert (Condition => Position /= Maps.No_Element, Message => "No element for key Foo"); Assert (Condition => Maps.Element (Position => Position) = Debug, Message => "Loglevel mismatch for position"); end; declare Position : Maps.Cursor; begin Position := Map.Find (Key => "Bar"); Assert (Condition => Position = Maps.No_Element, Message => "Found element for nonexistent key"); end; declare Level : Log_Level; pragma Unreferenced (Level); begin Level := Maps.Element (Position => Maps.No_Element); Fail (Message => "Expected constraint error"); exception when Constraint_Error => null; end; end Insert_Elements; ------------------------------------------------------------------------- procedure Update_Element is Map : Maps.Wildcard_Level_Map; begin Map.Insert (Key => "Foo", Item => Debug); Assert (Condition => Map.Element (Key => "Foo") = Debug, Message => "Loglevel mismatch"); Map.Insert (Key => "Foo", Item => Error); Assert (Condition => Map.Element (Key => "Foo") = Error, Message => "Update failed"); end Update_Element; ------------------------------------------------------------------------- procedure Wildcard_Lookup is Map : Maps.Wildcard_Level_Map; begin Map.Insert (Key => "Foo.*", Item => Notice); Map.Insert (Key => "Foo.Bar", Item => Warning); declare Position : Maps.Cursor; begin Position := Map.Lookup (Key => "Foo"); Assert (Condition => Maps.Element (Position => Position) = Notice, Message => "Loglevel for Foo not notice"); end; declare Position : Maps.Cursor; begin Position := Map.Lookup (Key => "Foo.Bar"); Assert (Condition => Maps.Element (Position => Position) = Warning, Message => "Loglevel for Foo.Bar not warning"); end; declare Position : Maps.Cursor; begin Position := Map.Lookup (Key => "Foo.Foo"); Assert (Condition => Maps.Element (Position => Position) = Notice, Message => "Loglevel for Foo.Foo not notice"); end; declare Position : Maps.Cursor; begin Position := Map.Lookup (Key => "Foo.Bar.Foo"); Assert (Condition => Maps.Element (Position => Position) = Notice, Message => "Loglevel for Foo.Bar.Foo not notice"); end; declare use type Maps.Cursor; Position : Maps.Cursor; begin Position := Map.Lookup (Key => "Bar.Bar"); Assert (Condition => Position = Maps.No_Element, Message => "No_Element expected"); end; end Wildcard_Lookup; end Maps_Tests; libalog-0.4.1/tests/maps_tests.ads000066400000000000000000000025131172144577100171540ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog map data structures. package Maps_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Insert_Elements; -- Insert and get elements into/from a wildcard map. procedure Update_Element; -- Update a wildcard map element. procedure Wildcard_Lookup; -- Verify wildcard lookup. procedure Clear_Map; -- Clear a wildcard map. end Maps_Tests; libalog-0.4.1/tests/policy_tests.adb000066400000000000000000000173621172144577100175020ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; with Alog.Maps; with Alog.Policy_DB; package body Policy_Tests is use Ahven; use Alog; package DB renames Alog.Policy_DB; ------------------------------------------------------------------------- procedure Default_Loglevel_Handling is Before : constant Log_Level := DB.Get_Default_Loglevel; New_Level : constant Log_Level := Critical; begin DB.Set_Default_Loglevel (Level => New_Level); Assert (Condition => DB.Get_Default_Loglevel = New_Level, Message => "Default level mismatch"); DB.Set_Default_Loglevel (Level => Before); end Default_Loglevel_Handling; ------------------------------------------------------------------------- procedure Finalize (T : in out Testcase) is pragma Unreferenced (T); begin DB.Reset; end Finalize; ------------------------------------------------------------------------- procedure Ident_Loglevel_Handling is begin DB.Set_Loglevel (Identifier => "Foo", Level => Info); Assert (Condition => DB.Get_Loglevel (Identifier => "Foo") = Info, Message => "Ident loglevel mismatch"); DB.Set_Loglevel (Identifier => "Foo", Level => Error); Assert (Condition => DB.Get_Loglevel (Identifier => "Foo") = Error, Message => "Unable to update identifier loglevel"); declare Level : Log_Level; pragma Unreferenced (Level); begin Level := DB.Get_Loglevel (Identifier => "Bar"); Fail (Message => "Expected No_Ident_Loglevel"); exception when DB.No_Ident_Loglevel => null; end; end Ident_Loglevel_Handling; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for the logging policy database"); T.Add_Test_Routine (Routine => Reset_Policy_DB'Access, Name => "reset policy database"); T.Add_Test_Routine (Routine => Default_Loglevel_Handling'Access, Name => "default loglevel handling"); T.Add_Test_Routine (Routine => Ident_Loglevel_Handling'Access, Name => "identifier based loglevel handling"); T.Add_Test_Routine (Routine => Set_Identifier_Map'Access, Name => "set identifier loglevel map"); T.Add_Test_Routine (Routine => Verify_Accept_Src'Access, Name => "accept source"); T.Add_Test_Routine (Routine => Verify_Accept_Dst'Access, Name => "accept destination"); T.Add_Test_Routine (Routine => Lookup_Ident'Access, Name => "lookup identifier"); end Initialize; ------------------------------------------------------------------------- procedure Lookup_Ident is begin DB.Set_Default_Loglevel (Level => Error); DB.Set_Loglevel (Identifier => "Lookup.*", Level => Warning); Assert (Condition => DB.Lookup (Identifier => "Lookup") = Warning, Message => "Lookup mismatch"); Assert (Condition => DB.Lookup (Identifier => "Nonexistent") = Error, Message => "Nonexistent mismatch"); end Lookup_Ident; ------------------------------------------------------------------------- procedure Reset_Policy_DB is begin DB.Set_Default_Loglevel (Level => Error); DB.Set_Loglevel (Identifier => "Foo", Level => Warning); DB.Reset; Assert (Condition => DB.Get_Default_Loglevel = DB.Alog_Default_Level, Message => "Default loglevel mismatch"); declare Src_Level : Log_Level; pragma Unreferenced (Src_Level); begin Src_Level := DB.Get_Loglevel (Identifier => "Foo"); Fail (Message => "Src levels not reset"); exception when DB.No_Ident_Loglevel => null; end; end Reset_Policy_DB; ------------------------------------------------------------------------- procedure Set_Identifier_Map is Map : Maps.Wildcard_Level_Map; begin Map.Insert (Key => "Foo", Item => Notice); Map.Insert (Key => "Bar", Item => Warning); DB.Set_Loglevel (Identifiers => Map); Assert (Condition => DB.Get_Loglevel (Identifier => "Foo") = Notice, Message => "Foo identifier loglevel mismatch"); Assert (Condition => DB.Get_Loglevel (Identifier => "Bar") = Warning, Message => "Bar identifier loglevel mismatch"); end Set_Identifier_Map; ------------------------------------------------------------------------- procedure Verify_Accept_Dst is begin DB.Reset; -- Default loglevel should be ignored DB.Set_Default_Loglevel (Level => Info); Assert (Condition => DB.Accept_Dst (Identifier => "Foobar", Level => Debug), Message => "Debug not accepted"); DB.Set_Loglevel (Identifier => "Foo.*", Level => Error); Assert (Condition => not DB.Accept_Dst (Identifier => "Foo", Level => Debug), Message => "Dst debug accepted"); Assert (Condition => DB.Accept_Src (Identifier => "Foo", Level => Critical), Message => "Dst critical not accepted"); Assert (Condition => DB.Accept_Dst (Identifier => "Bar", Level => Info), Message => "Dst bar not accepted"); end Verify_Accept_Dst; ------------------------------------------------------------------------- procedure Verify_Accept_Src is begin DB.Reset; DB.Set_Default_Loglevel (Level => Info); Assert (Condition => not DB.Accept_Src (Level => Debug), Message => "Debug accepted"); Assert (Condition => DB.Accept_Src (Level => Warning), Message => "Warning not accepted"); DB.Set_Loglevel (Identifier => "Foo.*", Level => Error); Assert (Condition => not DB.Accept_Src (Identifier => "Foo", Level => Debug), Message => "Src debug accepted"); Assert (Condition => DB.Accept_Src (Identifier => "Foo", Level => Critical), Message => "Src critical not accepted"); Assert (Condition => DB.Accept_Src (Identifier => "Bar", Level => Info), Message => "Src bar not accepted"); DB.Set_Loglevel (Identifier => "Foobar.*", Level => Debug); Assert (Condition => DB.Accept_Src (Identifier => "Foobar", Level => Debug), Message => "Src foobar not accepted"); end Verify_Accept_Src; end Policy_Tests; libalog-0.4.1/tests/policy_tests.ads000066400000000000000000000033131172144577100175120ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for the logging policy database package. package Policy_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Finalize (T : in out Testcase); -- Finalize testcase. procedure Reset_Policy_DB; -- Reset the policy database to initial state. procedure Default_Loglevel_Handling; -- Test default loglevel handling. procedure Ident_Loglevel_Handling; -- Test setting/getting of identifier based loglevels. procedure Set_Identifier_Map; -- Test setting of identifier based loglevels with wildcard map. procedure Verify_Accept_Src; -- Verify accept src behavior. procedure Verify_Accept_Dst; -- Verify accept dst behavior. procedure Lookup_Ident; -- Verify identifier lookup behavior. end Policy_Tests; libalog-0.4.1/tests/profiler_base.adb000066400000000000000000000023651172144577100175720ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Alog.Logger; with Alog.Policy_DB; procedure Profiler_Base is use Alog; Log : Logger.Instance (Init => False); begin Policy_DB.Set_Loglevel (Identifier => "Foo.*", Level => Debug); for I in 1 .. 100000 loop Log.Log_Message (Source => "Foo.Foo.Foo.Foo", Level => Notice, Msg => "Test message"); end loop; end Profiler_Base; libalog-0.4.1/tests/protected_container_tests.adb000066400000000000000000000112071172144577100222260ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Task_Identification; with Ahven; use Ahven; with Alog.Log_Request; with Alog.Protected_Containers; package body Protected_Container_Tests is use Alog; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for protected containers"); T.Add_Test_Routine (Routine => Log_Request_List_Get_Put'Access, Name => "log request list get/put"); T.Add_Test_Routine (Routine => Log_Request_List_Clear'Access, Name => "log request list clear"); T.Add_Test_Routine (Routine => Log_Request_List_Done'Access, Name => "log request list done"); end Initialize; ------------------------------------------------------------------------- procedure Log_Request_List_Clear is use Ada.Task_Identification; R_List : Protected_Containers.Log_Request_List; Ref_Request : Log_Request.Instance; Ref_ID : constant Task_Id := Current_Task; Ref_Msg : constant String := "Some log message"; begin R_List.Clear; Ref_Request := Log_Request.Create (ID => Ref_ID, Level => Notice, Message => Ref_Msg); R_List.Put (Element => Ref_Request); Assert (Condition => R_List.Length = 1, Message => "Unable to insert request"); R_List.Clear; Assert (Condition => R_List.Length = 0, Message => "Unable to clear list"); end Log_Request_List_Clear; ------------------------------------------------------------------------- procedure Log_Request_List_Done is use Ada.Task_Identification; R_List : Protected_Containers.Log_Request_List; Ref_Request : Log_Request.Instance; Ref_ID : constant Task_Id := Current_Task; Ref_Msg : constant String := "Some log message"; begin Ref_Request := Log_Request.Create (ID => Ref_ID, Level => Notice, Message => Ref_Msg); Assert (Condition => R_List.Pending = 0, Message => "new list has pending requests"); R_List.Done; Assert (Condition => R_List.Pending = 0, Message => "done on new list failed"); R_List.Put (Element => Ref_Request); R_List.Get (Element => Ref_Request); Assert (Condition => R_List.Pending = 1, Message => "No request pending"); R_List.Done; Assert (Condition => R_List.Pending = 0, Message => "Still pending requests"); end Log_Request_List_Done; ------------------------------------------------------------------------- procedure Log_Request_List_Get_Put is use Ada.Task_Identification; R_List : Protected_Containers.Log_Request_List; Ref_Request : Log_Request.Instance; Ref_ID : constant Task_Id := Current_Task; Ref_Msg : constant String := "Some log message"; begin Ref_Request := Log_Request.Create (ID => Ref_ID, Level => Notice, Message => Ref_Msg); Assert (Condition => R_List.Length = 0, Message => "List not empty"); R_List.Put (Element => Ref_Request); Assert (Condition => R_List.Length = 1, Message => "Unable to insert request"); declare use type Alog.Log_Request.Instance; New_Request : Log_Request.Instance; begin R_List.Get (Element => New_Request); Assert (Condition => New_Request = Ref_Request, Message => "Request mismatch"); end; end Log_Request_List_Get_Put; end Protected_Container_Tests; libalog-0.4.1/tests/protected_container_tests.ads000066400000000000000000000025351172144577100222530ustar00rootroot00000000000000-- -- Copyright (c) 2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog protected containers. package Protected_Container_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Log_Request_List_Get_Put; -- Test log request list get and put operations. procedure Log_Request_List_Clear; -- Test log request list clear operation. procedure Log_Request_List_Done; -- Test log request list Done operation. end Protected_Container_Tests; libalog-0.4.1/tests/runner_base.adb000066400000000000000000000055331172144577100172610ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Text_Runner; with Ahven.Framework; with Helper_Tests; with Log_Request_Tests; with Protected_Container_Tests; with Facility_Tests.FD; with Facility_Tests.Syslog; with Transform_Tests.Casing; with Logger_Tests; with Tasked_Logger_Tests; with Active_Logger_Tests; with Maps_Tests; with Policy_Tests; procedure Runner_Base is S : constant Ahven.Framework.Test_Suite_Access := Ahven.Framework.Create_Suite (Suite_Name => "Alog base tests"); begin Ahven.Framework.Add_Test (Suite => S.all, T => new Helper_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Log_Request_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Protected_Container_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Maps_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.FD.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.Syslog.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Transform_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Transform_Tests.Casing.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Logger_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Tasked_Logger_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Active_Logger_Tests.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Policy_Tests.Testcase); Ahven.Text_Runner.Run (Suite => S); Ahven.Framework.Release_Suite (T => S); end Runner_Base; libalog-0.4.1/tests/runner_full.adb000066400000000000000000000030431172144577100173030ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Text_Runner; with Ahven.Framework; with Facility_Tests.SMTP; with Facility_Tests.XMPP; with Facility_Tests.PGSQL; procedure Runner_Full is S : constant Ahven.Framework.Test_Suite_Access := Ahven.Framework.Create_Suite (Suite_Name => "Alog full tests"); begin Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.SMTP.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.XMPP.Testcase); Ahven.Framework.Add_Test (Suite => S.all, T => new Facility_Tests.PGSQL.Testcase); Ahven.Text_Runner.Run (Suite => S); Ahven.Framework.Release_Suite (T => S); end Runner_Full; libalog-0.4.1/tests/tasked_logger_tests.adb000066400000000000000000000343461172144577100210160ustar00rootroot00000000000000-- -- Copyright (c) 2008-2011, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Exceptions; with Ada.Task_Identification; with Ahven; with Alog.Logger; with Alog.Tasked_Logger; with Alog.Facilities.File_Descriptor; with Alog.Facilities.Syslog; with Alog.Facilities.Mock; with Alog.Transforms.Casing; package body Tasked_Logger_Tests is use Ahven; use Alog; Counter : Natural := 0; pragma Atomic (Counter); procedure Do_Nothing (Facility_Handle : Facilities.Handle) is null; -- Just do nothing. procedure Inc_Counter (F_Handle : Facilities.Handle); -- Increment iterate counter. procedure Raise_Exception (F_Handle : Facilities.Handle); -- Raise constraint error. procedure Enable_Facility_Timestamp (Facility_Handle : Facilities.Handle); -- Enable write timestamp of facility. procedure Except_Handler (Except : Ada.Exceptions.Exception_Occurrence; Caller : Ada.Task_Identification.Task_Id); -- Exception handler used in tests. Just increments the atomic counter. ------------------------------------------------------------------------- procedure Attach_Facility is Log : Tasked_Logger.Instance (Init => False); Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Count : Natural := Natural'Last; begin Log.Facility_Count (Count => Count); Assert (Condition => Count = 0, Message => "facility count not 0"); Log.Attach_Facility (Facility => Facility); Log.Facility_Count (Count => Count); Assert (Condition => Count = 1, Message => "could not attach facility"); begin Log.Attach_Facility (Facility => Facility); Fail (Message => "attached duplicate facility"); exception when Logger.Facility_Already_Present => null; end; end Attach_Facility; ------------------------------------------------------------------------- procedure Attach_Transform is Log : Tasked_Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; Count : Natural := Natural'Last; begin Log.Transform_Count (Count => Count); Assert (Condition => Count = 0, Message => "transform count not 0"); Log.Attach_Transform (Transform => Transform); Log.Transform_Count (Count => Count); Assert (Condition => Count = 1, Message => "could not attach transform"); begin Log.Attach_Transform (Transform => Transform); Fail (Message => "attached duplicate transform"); exception when Logger.Transform_Already_Present => null; end; end Attach_Transform; ------------------------------------------------------------------------- procedure Default_Facility_Handling is Logger1 : Tasked_Logger.Instance (Init => False); Logger2 : Tasked_Logger.Instance (Init => True); F_Count : Natural := Natural'Last; begin Logger1.Attach_Default_Facility; Logger1.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 1, Message => "Unable to attach facility"); Logger1.Attach_Default_Facility; Logger1.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 1, Message => "Attached facility twice"); Logger1.Detach_Default_Facility; Logger1.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 0, Message => "Unable to detach facility"); Logger2.Attach_Default_Facility; Logger2.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 1, Message => "Attached facility to initialzed logger"); Logger2.Detach_Default_Facility; Logger2.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 0, Message => "Unable to detach facility from logger"); end Default_Facility_Handling; ------------------------------------------------------------------------- procedure Detach_Facility_Unattached is Log : Tasked_Logger.Instance (Init => False); Facility : Facilities.Handle := new Facilities.Syslog.Instance; begin begin Facility.Set_Name ("Syslog_Facility"); Log.Detach_Facility (Name => Facility.Get_Name); Fail (Message => "could detach unattached facility"); exception when Logger.Facility_Not_Found => -- Free not attached facility, this is not done by the logger -- (since it was never attached). Alog.Logger.Free (Facility); end; declare F_Count : Natural := Natural'Last; begin -- Tasking_Error will be raised if tasked logger has terminated due -- to an unhandled exception. Log.Facility_Count (Count => F_Count); end; end Detach_Facility_Unattached; ------------------------------------------------------------------------- procedure Detach_Transform is Log : Tasked_Logger.Instance (Init => False); Transform : constant Transforms.Handle := new Transforms.Casing.Instance; Count : Natural := 0; begin Transform.Set_Name ("Casing_Transform"); Log.Attach_Transform (Transform => Transform); Log.Transform_Count (Count => Count); Assert (Condition => Count = 1, Message => "Unable to attach transform"); Log.Detach_Transform (Name => Transform.Get_Name); Log.Transform_Count (Count => Count); Assert (Condition => Count = 0, Message => "Unable to detach transform"); end Detach_Transform; ------------------------------------------------------------------------- procedure Detach_Transform_Unattached is Log : Tasked_Logger.Instance (Init => False); Transform : Transforms.Handle := new Transforms.Casing.Instance; begin begin Transform.Set_Name ("Casing_Transform"); Log.Detach_Transform (Name => Transform.Get_Name); Fail (Message => "could detach unattached transform"); exception when Logger.Transform_Not_Found => -- Free not attached Transform, this is not done by the logger -- (since it was never attached). Alog.Logger.Free (Transform); end; declare T_Count : Natural := Natural'Last; begin -- Tasking_Error will be raised if tasked logger has terminated due -- to an unhandled exception. Log.Transform_Count (Count => T_Count); end; end Detach_Transform_Unattached; ------------------------------------------------------------------------- procedure Enable_Facility_Timestamp (Facility_Handle : Facilities.Handle) is begin Facility_Handle.Toggle_Write_Timestamp (State => True); end Enable_Facility_Timestamp; ------------------------------------------------------------------------- procedure Except_Handler (Except : Ada.Exceptions.Exception_Occurrence; Caller : Ada.Task_Identification.Task_Id) is pragma Unreferenced (Except, Caller); begin Counter := Counter + 1; end Except_Handler; ------------------------------------------------------------------------- procedure Inc_Counter (F_Handle : Facilities.Handle) is pragma Unreferenced (F_Handle); begin Counter := Counter + 1; end Inc_Counter; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for tasked Logger"); T.Add_Test_Routine (Routine => Attach_Facility'Access, Name => "attach facility"); T.Add_Test_Routine (Routine => Update_Facility'Access, Name => "update a facility"); T.Add_Test_Routine (Routine => Detach_Facility_Unattached'Access, Name => "detach not attached facility"); T.Add_Test_Routine (Routine => Attach_Transform'Access, Name => "attach a transform"); T.Add_Test_Routine (Routine => Detach_Transform'Access, Name => "detach transform"); T.Add_Test_Routine (Routine => Detach_Transform_Unattached'Access, Name => "detach not attached transform"); T.Add_Test_Routine (Routine => Verify_Logger_Initialization'Access, Name => "logger initialization behavior"); T.Add_Test_Routine (Routine => Logger_Exception_Handling'Access, Name => "exception handling"); T.Add_Test_Routine (Routine => Default_Facility_Handling'Access, Name => "default facility handling"); T.Add_Test_Routine (Routine => Iterate_Facilities'Access, Name => "iterate over facilities"); T.Add_Test_Routine (Routine => Iterate_Facilities_Exceptions'Access, Name => "iterate facilities exceptions"); end Initialize; ------------------------------------------------------------------------- procedure Iterate_Facilities is Log : Tasked_Logger.Instance (Init => False); Facility1 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Facility2 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; begin Counter := 0; Facility1.Set_Name (Name => "Facility1"); Facility2.Set_Name (Name => "Facility2"); Log.Attach_Facility (Facility => Facility1); Log.Attach_Facility (Facility => Facility2); Log.Iterate (Process => Inc_Counter'Access); Log.Clear; Assert (Condition => Counter = 2, Message => "counter not 2"); end Iterate_Facilities; ------------------------------------------------------------------------- procedure Iterate_Facilities_Exceptions is use Ada.Exceptions; Log : Tasked_Logger.Instance (Init => False); Facility1 : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; begin Counter := 0; Log.Set_Except_Handler (Proc => Except_Handler'Access); Facility1.Set_Name (Name => "Facility1"); Log.Attach_Facility (Facility => Facility1); Log.Iterate (Process => Raise_Exception'Access); for I in 1 .. 30 loop exit when Counter /= 0; delay 0.1; end loop; Assert (Condition => Counter = 1, Message => "Exception counter not 1"); Log.Clear; end Iterate_Facilities_Exceptions; ------------------------------------------------------------------------- procedure Logger_Exception_Handling is Log : Tasked_Logger.Instance; Mock_Facility : constant Facilities.Handle := new Facilities.Mock.Instance; begin Counter := 0; Log.Set_Except_Handler (Proc => Except_Handler'Access); Log.Attach_Facility (Facility => Mock_Facility); Log.Log_Message (Level => Debug, Msg => "Test message"); for I in 1 .. 30 loop exit when Counter /= 0; delay 0.1; end loop; Assert (Condition => Counter = 1, Message => "Exception counter not 1"); end Logger_Exception_Handling; ------------------------------------------------------------------------- procedure Raise_Exception (F_Handle : Facilities.Handle) is begin raise Constraint_Error with "DON'T PANIC! This is a test exception!"; end Raise_Exception; ------------------------------------------------------------------------- procedure Update_Facility is Log : Tasked_Logger.Instance (Init => False); begin Counter := 0; Log.Set_Except_Handler (Proc => Except_Handler'Access); Log.Update (Name => "Nonexistent", Process => Do_Nothing'Access); for I in 1 .. 30 loop exit when Counter /= 0; delay 0.1; end loop; Assert (Condition => Counter = 1, Message => "Exception counter not 1"); declare Facility : constant Facilities.Handle := new Facilities.File_Descriptor.Instance; Facility_Name : constant String := "Test_Facility"; begin Facility.Set_Name (Name => Facility_Name); Facility.Toggle_Write_Timestamp (State => False); Assert (Condition => not Facility.Is_Write_Timestamp, Message => "Could not disable Timestamp"); Log.Attach_Facility (Facility => Facility); Log.Update (Name => Facility_Name, Process => Enable_Facility_Timestamp'Access); -- Since Update is not synchronous and we are accessing the facility -- directly we must wait for the update to actually take place. delay 0.1; Assert (Condition => Facility.Is_Write_Timestamp, Message => "Update failed"); end; end Update_Facility; ------------------------------------------------------------------------- procedure Verify_Logger_Initialization is Logger1 : Tasked_Logger.Instance; Logger2 : Tasked_Logger.Instance (Init => True); F_Count : Natural := Natural'Last; begin Logger1.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 0, Message => "logger1 not empty"); Logger2.Facility_Count (Count => F_Count); Assert (Condition => F_Count = 1, Message => "logger2 empty"); end Verify_Logger_Initialization; end Tasked_Logger_Tests; libalog-0.4.1/tests/tasked_logger_tests.ads000066400000000000000000000043521172144577100210310ustar00rootroot00000000000000-- -- Copyright (c) 2008-2009, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; -- Tests for Alog tasked logger component. package Tasked_Logger_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Attach_Facility; -- Test Facility attaching to tasked logger. procedure Update_Facility; -- Test Facility update operation. procedure Detach_Facility_Unattached; -- Test Facility detaching of tasked logger with a un-attached instance. -- Verify that logger remains responsive after exception. procedure Attach_Transform; -- Test Transform attaching to tasked logger. procedure Detach_Transform; -- Test Transform detaching of tasked logger. procedure Detach_Transform_Unattached; -- Test Transform detaching of tasked logger with un-attached instance. -- Verify that logger remains responsive after exception. procedure Verify_Logger_Initialization; -- Test tasked logger instance initialization behavior. procedure Logger_Exception_Handling; -- Test tasked logger instance exception handling. procedure Default_Facility_Handling; -- Test tasked logger attaching/detaching of default facility. procedure Iterate_Facilities; -- Test tasked logger facility iteration. procedure Iterate_Facilities_Exceptions; -- Test tasked logger facility iteration with exceptions. end Tasked_Logger_Tests; libalog-0.4.1/tests/transform_tests-casing.adb000066400000000000000000000055011172144577100214500ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ada.Strings.Unbounded; with Alog.Transforms.Casing; package body Transform_Tests.Casing is use Alog; use Ada.Strings.Unbounded; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for Casing Transform"); T.Add_Test_Routine (Routine => Transform_Message_Lowercase'Access, Name => "transform a message to lowercase"); T.Add_Test_Routine (Routine => Transform_Message_Uppercase'Access, Name => "transform a message to uppercase"); end Initialize; ------------------------------------------------------------------------- procedure Transform_Message_Lowercase is T : Alog.Transforms.Casing.Instance; Message : constant String := "Test Message"; Transformed_Msg : Unbounded_String; Ref_Transformed_Msg : constant String := "test message"; begin T.Setup; Transformed_Msg := To_Unbounded_String ( T.Transform_Message (Info, Message)); Assert (Condition => Transformed_Msg = Ref_Transformed_Msg, Message => "Output does not match expected value (lowercase)"); T.Teardown; end Transform_Message_Lowercase; ------------------------------------------------------------------------- procedure Transform_Message_Uppercase is T : Alog.Transforms.Casing.Instance; Message : constant String := "Test Message"; Transformed_Msg : Unbounded_String; Ref_Transformed_Msg : constant String := "TEST MESSAGE"; begin T.Setup; T.Set_Mode (Alog.Transforms.Casing.Uppercase); Transformed_Msg := To_Unbounded_String ( T.Transform_Message (Info, Message)); Assert (Condition => Transformed_Msg = Ref_Transformed_Msg, Message => "Output does not match expected value (uppercase)"); T.Teardown; end Transform_Message_Uppercase; end Transform_Tests.Casing; libalog-0.4.1/tests/transform_tests-casing.ads000066400000000000000000000023351172144577100214730ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven.Framework; package Transform_Tests.Casing is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Transform_Message_Lowercase; -- Test lowercase message transformation. procedure Transform_Message_Uppercase; -- Test uppercase message transformation. end Transform_Tests.Casing; libalog-0.4.1/tests/transform_tests.adb000066400000000000000000000031061172144577100202050ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Alog.Transforms.Casing; package body Transform_Tests is use Alog; ------------------------------------------------------------------------- procedure Initialize (T : in out Testcase) is begin T.Set_Name (Name => "Tests for Transforms"); T.Add_Test_Routine (Routine => Set_Name'Access, Name => "set transform name"); end Initialize; ------------------------------------------------------------------------- procedure Set_Name is T : Transforms.Casing.Instance; Expected : constant String := "Test transform"; begin T.Set_Name (Name => Expected); Assert (Condition => T.Get_Name = Expected, Message => "name not equal"); end Set_Name; end Transform_Tests; libalog-0.4.1/tests/transform_tests.ads000066400000000000000000000022441172144577100202300ustar00rootroot00000000000000-- -- Copyright (c) 2008, -- Reto Buerki, Adrian-Ken Rueegsegger -- -- This file is part of Alog. -- -- Alog is free software; you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published -- by the Free Software Foundation; either version 2.1 of the License, or -- (at your option) any later version. -- -- Alog is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with Alog; if not, write to the Free Software -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -- MA 02110-1301 USA -- with Ahven; use Ahven; with Ahven.Framework; with Alog; -- Tests for Alog transform components. package Transform_Tests is type Testcase is new Ahven.Framework.Test_Case with null record; procedure Initialize (T : in out Testcase); -- Initialize testcase. procedure Set_Name; -- Set name of Transform test. end Transform_Tests;