The loghorn library

Overview

loghorn is a plain C (actually, ANSI C) library for logging and message printing; generally, it lets you have diagnostic message printing statements all across your code, each with its own "severity level", and determine in your main program which of these statements will actually work, and how.

Despite the library is built as a single .a file, it consists of two modules not intended to work together:

It is planned to provide "adapter" modules for (unfortunate) cases when one (same) module of your project is to be used both in a batch program and in a daemon; actually, I used one such "adapter" in the past, but found it is better to get rid of any diagnostic messages in modules of the kind.

How to use

Sorry guys, as usual there's no documentation for the library. My bad. Take a look at the headers though, they contain a lot of commentary.

License

The library is dually licensed: you can use it either under the terms and condition of CROCO'S INDIVIDUALISTIC FREE SOFTWARE LICENSE, any version published by Andrey Vikt. Stolyarov, not older than the date when the library itself (the version in question) was published, or, at your option, you can use the well-known GNU LESSER GENERAL PUBLIC LICENSE version 2.1, as published by Free Software Foundation, Inc.

Downloads


Last updated May 12, 2026

Valid HTML 4.01!