Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Logging Library for C++ 17/20, C# and Java on GNU/Linux, Windows, macOS, Android with Automatic Pruning of Log Statements

License

NotificationsYou must be signed in to change notification settings

AlexWorx/ALox-Logging-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please find all about theALox Logging Library, including

  • Tutorials
  • User manual
  • Reference documentation
  • FAQ and the
  • Change log

at theALox Homepage.

Overview

ALox is a software library providing an ecosystem for structured and organized log output.

ALox is available asALox for C++ 11,ALox for C# andALox for Java.

To reach this goal, ALox is featured byALib (see ALib forC++,C#,Java), which is a basic utility library that among other goalsprovides'source-compatible' types for the three languages.

ALox attempts to make logging as easy and intuitive as possible. We want you tostop adding temporary debug output lines into your code. Instead, write (with less effort!) short, nice and readableALox statements that live in your code as if they were comment lines. Let ALox do the rest: Add meta information to the output, format the output, filter output based on verbosity level and based on your current topic of interest. Finally, get it allpruned out of your release executable, same as your source comments.

On the other end of the list, ALox enablesrelease logging for productive applications to collect mission criticalmetrics from the field.

This isVersion 2402 Revision 0.

C++ Version

As of library version 1805, the C++ codebase was extracted from this repository.ALox for C++ became a "module" of general purpose class library"ALib".

Consequently,ALib for C++ also disposes about a dedicatedhomepage.

Features

  • Available forC++ 17/21 (GNU/Linux, Windows OS, macOS, Raspberry OS),C# (.Net, Windows, Linux, Microsoft, Mono) andJava(with Android support and extensions).

  • Free software, published under Boost Software License.

  • Jump-starttutorials forALox for C++,ALox for C# andALox for Java,Sample Projects and pre-configured project files fordifferent IDEs andCMake.

  • Formatted,colorful andconfigurable log output** with support for ANSI compatible consoles and Windows OS consoles.

  • Log lines'clickable' in IDE to jump to the corresponding source code line (depending on IDE).

  • Automatic collection ofmeta information like time stamp, time-difference to previous log, executing thread or executing source scope information (platform/language dependent).

  • Automatic removal, aka'pruning', ofdebug-log statements from release code mostly without the need of pre-processor if/endif code cluttering. Optionally also automatic pruning ofrelease-log statements. (In Java: implemented usingProguard, with provision of ready to use configuration files.

  • Minimal intrusiveness in respect tocluttering your code and what you need to make it really work.
  • Use of external configuration (INI-files, command line parameters, environment variables, etc.) which allows developer specific local settings and greatly supports working in teams.

  • Hierarchical 'Log-Domains', (like for example "MYAPP/UI", "MYAPP/DATABASE" that allow the classification of different log statements into user defined topics. Verbosity is controlled per domain to allow the programmer to concentrate on the area of current interest.

  • Defaulting 'Log-Domains' forsource scopes, likefile,class ormethod, which allows to omit the log-domain parameter from the log statements (again: leads to short, clean and readable log statements).

  • Defaulting 'Log-Domains' forthread scopes, which allows to control the verbosity of the log output on a per thread basis.

  • Support forCMake,Eclipse,Visual Studio,QT Creator,Mono Develop in combination withGNU/Linux,Windows,Windows Phone andAndroid. (Windows Phone in current versions not tested any more). Porting to other platforms should be easy.

  • Veryfast to minimize runtime overhead of logging (We just broke our former record and didone million log lines in a second, including meta information. This was of-course the C++ version doing release logging on release executable).

  • Multipleparallel log streams with differentfilters and verbosity levels, e.g. for logging to the console and in parallel into a file.

  • Extensible with own loggers, which enables dedicated "data drains" (e.g. databases or Internet services) and custom output formatting. ALox provides a simple programming interface and internal architecture that is easy to learn, not overloaded by 'factories' and 'factory factories' ;-)

  • Logging ofarbitrary objects which means the whole ALox architecture is designed for logging 'objects' instead of just string messages. Only the logger instances which are attached at runtime, decide how logged data might be converted to human readable strings.

  • Scope dependentLog Data to add debug variables that automatically get pruned like the debug-logging statments are.

  • Conditional logging (similar to assertions).

  • Log Once to restrict a log message or a set of log messages to appear only once (or up to n-times).

  • Support forRecursive logging, which is the correct execution of log statements during the evaluation of parameters of another log statement.

  • Automatic (OK, half-automatic :-) mapping of thread IDs toreadable thread names

  • LogTools (in C# and Java) for

    • Recursivelogging of complex types with one line of code usingclass inspection/reflection. Variable recursion depth and detection of cyclic references.
    • LoggingExceptions (recursively with inner exceptions)
    • LoggingXML trees
  • C++ version:

    • Compiled and tested onGNU/Linux,Windows OS and ApplemacOS.
    • Acceptsarbitrary objects to be logged. This goal is reached by using underlying libraryALib Boxing which allows to pass 'anything' as a parameter to C++ functions and methods.
    • Accepts3rd party string types. This goal is reached by using underlying libraryALib Strings.
    • Note: The C++ version moved to a different website:ALox for C++
  • and finally: ALox is undercontinuous development. You're invited to contribute!

#AlternativesThe following alternatives toALox may be worth mentioning:

For C++:

For C#:

For Java:

About

Logging Library for C++ 17/20, C# and Java on GNU/Linux, Windows, macOS, Android with Automatic Pruning of Log Statements

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp