retdec/tests/llvmir2hll
Peter Kubov b59f811f23
Provide unified logging interface (#816)
* retdec::io: new logging interface

Provides new logging interface that is ment to unify output that
is produced in each part of RetDec decompiler.

The interface is designed to provide eazy management
of logging into files/tty.

Currently each module od decompiler manages logging on its own.
This is not sustainable state as change to logging interface
is rather difficult.

* Use retdec::io interface for logging

* Get rid of llvm-support module

This module is now obsolete as all logging mechanisms
have been transferred to retdec::io module.

* Provide option [-s|--silent]

Provides new option [-s|--silent] for retdec-decompiler executable.
This option will force retdec not to output anything on stdout.

* retdec/config: provide option to specify Log/Error files

Provides way to specify Log/Error files to RetDec.
This is useful for RetDec plugins that might this way
control decompilation output.

* Create loggers from user configuration

* Fix validators error messages

Fixes bug provided by fbbff343.

* Change Log functions to return new object

Provides change to log interface. Before this commit
logging was done on global objects. Now the logging
should be made on temporary objects that are returned
from special functions.

The reason for this is for usage of colors on output.
When temporary object is destructed default color is
printed on required interface.

* Change namespace Log to class Log

This way we can avoid not intentional usage of the
Log interface.

All functions of Log are ment to be used like:

Log::info()
Log::debug()
Log::error()

* Provide missing doxygen

* Fix missing cassert header

Fixes dc5791724.

* Enable ANSI colors on Windows

Starting Windows aniversary update Windows terminals provide
supprot for ANSI colors. This, however, needs to be enabled
manually.

More about this can be found here:
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences?redirectedfrom=MSDN

* utils/io/logger: don't print colors to not supported terminals

* Use macro OS_WINDOWS instead of __has_include

Provides substitution of __has_include macro to OS_WINDOWS defined
in utils/os.h. The reason for this is to maintain a level of
consistency in RetDec source code base.

* Add a CHANGELOG entry for #791
2020-07-23 09:29:10 +02:00
..
analysis add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
config Retdec is a library now (#779) 2020-06-05 07:42:46 +02:00
evaluator/arithm_expr_evaluators modify all sources to compile and (mostly) work with LLVM 8.0.0. 2019-03-28 16:55:55 +01:00
graphs/cfg add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
hll llvmir2hll: distinguish local and global vars in JSON output 2020-06-18 18:41:55 +02:00
ir Retdec is a library now (#779) 2020-06-05 07:42:46 +02:00
llvm remove unnecessary destructors 2019-12-18 13:50:21 +01:00
obtainer add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
optimizer/optimizers update 2020-01-27 17:38:36 -06:00
pattern Provide unified logging interface (#816) 2020-07-23 09:29:10 +02:00
semantics Fix issue #650 (#679) 2019-11-19 17:59:02 +01:00
support Retdec is a library now (#779) 2020-06-05 07:42:46 +02:00
utils add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
validator/validators add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
var_name_gen add a bunch of retdec namespaces 2018-01-05 19:32:43 +01:00
var_renamer Fix issue #650 (#679) 2019-11-19 17:59:02 +01:00
CMakeLists.txt Retdec is a library now (#779) 2020-06-05 07:42:46 +02:00