summaryrefslogtreecommitdiff
path: root/toxcore/logger.h
AgeCommit message (Collapse)Author
2020-03-14Standardise on having a comma at the end of enums.iphydf
Most of our enums already have one. Some didn't. Tokstyle is going to require commas at the end of enumerator lists in enum definitions.
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2018-10-19Add `LOGGER_ASSERT` for checking fatal error conditions.iphydf
These are not compiled out under `NDEBUG` and should be provably correct.
2018-10-07Make sure logger levels stay in sync across filesMaxim Biro
2018-09-14Standardise header guards.iphydf
Using the full path including the repo name.
2018-08-26Update copyright to 2018.iphydf
2018-07-22Run Clang global static analysis on Travis.iphydf
This uses a single .cc file containing almost all the code in the repository to perform whole program analysis.
2018-07-12Fix style in some header files.iphydf
* Enums must by typedef'd. * Comments at end of `#define` must be `//` comments. * Typedef structs must not be anonymous. * `;` at the end of a `#define` is invalid. * Callback typedefs must list their parameter names. * No nested structs. * No inline use of function pointer types. Only typedef'd callback types are allowed. * Enum types are spelled in Camelsnake_Case. * The argument to `#error` must be a string literal.
2018-03-17Disallow stderr logger by default.iphydf
2018-03-16Add default stderr logger for logging to nullptr.iphydf
This is useful for debugging a function that doesn't have a logger available. It should not be used in production code, since it outputs to stderr.
2018-02-24Fix a bunch of compiler warnings and remove suppressions.iphydf
2017-08-22Fix compiler warning due to missing voidMaxim Biro
2017-01-19Update license headers and remove redundant file name comment.iphydf
"All rights reserved" was incorrect. The project was licensed under GPL3, which means a lot of rights are licensed to everybody in the world, i.e. not reserved to the "Tox Project".
2016-09-30Add the 'Tox' context object to the logger.iphydf
We don't currently support callbacks without context object.
2016-09-06Improve C standard compliance.iphydf
- Don't cast between object and function pointers. - Use standard compliant `__VA_ARGS__` in macros. - Add explicit `__extension__` on unnamed union in struct (it's a GNU extension). - Remove ; after function definitions. - Replace `const T foo = 3;` for integral types `T` with `enum { foo = 3 };`. Folding integral constants like that as compile time constants is a GNU extension. Arrays allocated with `foo` as dimension are VLAs on strictly compliant C99 compilers. - Replace empty initialiser list `{}` with zero-initialiser-list `{0}`. The former is a GNU extension meaning the latter. - Cast `T*` (where `T != void`) to `void *` in format arguments. While any object pointer can be implicitly converted to and from `void *`, this conversion does not happen in variadic function calls. - Replace arithmetic on `void *` with arithmetic on `char *`. The former is non-compliant. - Replace non-`int`-derived types (like `uint16_t`, which is `short`-derived) in bit fields with `int`-derived types. Using any type other than `int` or `unsigned int` (or any of their aliases) in bit fields is a GNU extension.
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2015-10-10New Adaptive BR algorithm, cleanups and fixesEniz Vukovic
2015-01-17fix_logger-v.0.2mannol
2015-01-10Merge branch 'mannol-master'irungentoo
2015-01-10Logger fixmannol
2014-11-24Merge branch 'master' of https://github.com/mannol/toxcoreirungentoo
2014-11-18av refactormannol
2014-08-04Fix some toxav warningsmannol
2014-07-21This should fix test failingmannol
2014-05-25Merge branch 'mannol1-Multicalls' into multi-avirungentoo
2014-05-24Tests works and some fixesmannol
2014-05-16This works.mannol
2014-05-10This should workmannol
2014-04-27Yeah many callsmannol