Commit Graph

17 Commits

Author SHA1 Message Date
Vincent Torri 8126debb06 fix most compilation errors with vc++ (there are still a
problem with eina_log and output of the log messages:
STDERR_FILENO, STDOUT_FILENO and isatty())

fix some warnings and header files inclusion

update vcproj files


SVN revision: 47384
2010-03-23 06:41:17 +00:00
Gustavo Sverzut Barbieri 61f65ae20a Allow user to redefine the default logging level used by
EINA_LOG_ERR(), EINA_LOG_DBG() and other macros.

This will help us to avoid the cumbersome work of having to define the
local macros. I still find the 3-letter macros handy, but we are not
forced to use them now.

I did a small modification to keep the EINA_LOG_DOMAIN_GLOBAL and use
a different symbol for the define, it is EINA_LOG_DOMAIN_DEFAULT. The
documentation was updated to highlight the 2 usage scenario and care
that must be used.


By: Peter Johnson <tam@hiddenrock.com>



SVN revision: 46700
2010-03-01 15:08:40 +00:00
Gustavo Sverzut Barbieri ebed1f20fe minor matching speedups.
keep log level name size (namelen) and use it before strcmp().



SVN revision: 45998
2010-02-09 02:13:55 +00:00
Gustavo Sverzut Barbieri 191d87d78a eina log level utilities.
couple of functions that are useful outside and should be fast.



SVN revision: 45996
2010-02-09 01:43:58 +00:00
Gustavo Sverzut Barbieri f7cd9786f1 eina log parameters getters and setters.
allow external users to check or set flags that are initialized based
on environment variables such as EINA_LOG_COLOR_DISABLE.



SVN revision: 45995
2010-02-09 00:52:00 +00:00
Vincent Torri 09d1853ea0 * finish benchmark tutorial
* move internal _init and _shutdown functions in the Global
   part of the code, as it is where they belong
 * fix minor documentation stuff


SVN revision: 44730
2009-12-27 08:45:30 +00:00
Gustavo Sverzut Barbieri f98cb6e5f5 fix lighblue and add cyan.
SVN revision: 42410
2009-09-11 14:22:24 +00:00
Gustavo Sverzut Barbieri e4af7c100c EINA API BREAK: no more individual modules init/shutdown.
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.

Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.

Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.

I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.

Please fix any breakages you find!



SVN revision: 42300
2009-09-06 22:21:56 +00:00
Gustavo Sverzut Barbieri 86aa8a433b mark log functions as not_instrument_function.
SVN revision: 42270
2009-09-04 21:55:03 +00:00
Gustavo Sverzut Barbieri b5397eea63 eina_log optimization: allow to compile out some debug messages.
Users may opt to set EINA_LOG_LEVEL_MAXIMUM to some integer and macro
will then evaluate to check for that value before actually call
eina_log_print() macro. By using optimizations compilers will
effectivelly compile out the code if it is never reached, thus saving
the check and function call in possible critical paths.



SVN revision: 42269
2009-09-04 21:28:50 +00:00
Gustavo Sverzut Barbieri eeb2d38d38 eina_log_vprint() for those that want to wrap it in other functions.
SVN revision: 42216
2009-09-04 00:57:09 +00:00
Gustavo Sverzut Barbieri 8024360138 eina_log: thread safe logging!
eina_log_threads_enable() and then get thread safe logging with
non-main threads being printed with special notation to easily spot
those.



SVN revision: 42199
2009-09-03 01:31:26 +00:00
Gustavo Sverzut Barbieri 9fb9b1259d eina_log: fix stderr, improve log output.
* stderr logger was doing prefix properly but user message to stdout, fixed.
 * log is improved:
   * grep-able, it shows the 3 letter level name as prefix, unknown levels
     will have their number printed.
   * colors just on prefix, less polluted output still easy to spot.
   * function names are highlighted.



SVN revision: 42197
2009-09-03 00:07:25 +00:00
Gustavo Sverzut Barbieri 418c99a8e3 eina_log improvements: docs, micro optimizations and stderr logging by default.
* more docs.
 * do not getenv("EINA_LOG_ABORT") everytime, just at init.
 * EINA_UNLIKELY() in some critical paths (not that big impact anyway)
 * eina_log_print_cb_stderr() and use it by default.




SVN revision: 42196
2009-09-02 23:28:00 +00:00
dieb 7eff1d432b Remove legacy error code definition from eina log.
SVN revision: 42126
2009-08-31 14:40:48 +00:00
dieb 7bc6284e09 Fix compilation issue reported by Vincent on Windows (stdint and c++ compiler), setup a negative value for flagging the unknown level.
SVN revision: 42049
2009-08-27 21:32:42 +00:00
dieb d7bbc05b12 Initial import of the new eina logging API.
* eina_error might be kept for error messages and codes, but it's logging API
  will be deprecated. For now, it's been kept for not breaking others code and
  for a smoother transition.
* Added test for new logging API, also demonstrates usage.


SVN revision: 41960
2009-08-24 21:43:48 +00:00