summaryrefslogtreecommitdiff
path: root/toxcore/logger.c
AgeCommit message (Collapse)Author
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-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-12Style fixes in TCP code; remove MIN and PAIR from util.h.iphydf
* Moved PAIR to toxav, where it's used (but really this should die). * Replace most MIN calls with typed `min_*` calls. Didn't replace the ones where the desired semantics are unclear. Moved the MIN macro to the one place where it's still used. * Avoid assignments in `while` loops. Instead, factored out the loop body into a separate `bool`-returning function. * Use named types for callbacks (`_cb` types). * Avoid assignments in `if` conditions. * Removed `MAKE_REALLOC` and expanded its two calls. We can't have templates in C, and this fake templating is ugly and hard to analyse and debug (it expands on a single line). * Moved epoll system include to the .c file, out of the .h file. * Avoid assignments in expressions (`a = b = c;`). * Avoid multiple declarators per struct member declaration. * Fix naming inconsistencies. * Replace `net_to_host` macro with function.
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-06-04Log only the filename, not the full path in LOGGER.iphydf
Fixes #900.
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.
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-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-08-31Add braces to all if statements.iphydf
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-04-09Make it possible to decode mono audio with stereo decodermannol
2015-01-18Add 2015 to copyright noticeMovingtoMars
2015-01-18Fix logging on WindowsMovingtoMars
2015-01-17Fixed logger build issue.irungentoo
2015-01-17fix_logger-v.0.2mannol
2015-01-12Fixed Windows buildMaxim Biro
Apparently ERROR was defined as some constant somewhere on Windows.
2015-01-10Fixed use after free.irungentoo
2015-01-10Merge branch 'mannol-master'irungentoo
2015-01-10Logger fixmannol
2014-12-19Merge branch 'logger_init_fix' of https://github.com/jdp5087/toxcoreirungentoo
2014-12-18Removed calloc from logger_init, because the pid was no longer being appended.Jon Poler
2014-11-24Merge branch 'master' of https://github.com/mannol/toxcoreirungentoo
2014-11-18av refactormannol
2014-06-18Comment out extra argument to sprintfTux3 / Mlkj / !Lev.uXFMLA
2014-05-25Merge branch 'mannol1-Multicalls' into multi-avirungentoo
2014-05-24Tests works and some fixesmannol
2014-05-16This works.mannol
2014-04-27Yeah many callsmannol