aboutsummaryrefslogtreecommitdiff
path: root/src/log.cpp
AgeCommit message (Collapse)Author
2022-05-23Add missing concurrency protection in logger (#12325)paradust7
2022-05-04Make logging cost free when there is no output target (#12247)paradust7
The logging streams now do almost no work when there is no output target for them. For example, if LL_VERBOSE has no output targets, then `verbosestream << x` will return a StreamProxy with a null target. Any further `<<` operations applied to it will do nothing.
2020-10-05Remove unused functions reported by cppcheck (#10463)SmallJoker
Run unused functions reported by cppcheck This change removes a few (but not all) unused functions. Some unused helper functions were not removed due to their complexity and potential of future use.
2020-05-14Add chat_log_level setting (#9223)SmallJoker
Log all higher levels in LogOutputBuffer Move StreamLogOutput::logRaw to source file like LogOutputBuffer::logRaw for compiling speed
2019-09-07Move debug.txt after it grows too big (#8904)HybridDog
Before opening the file for writing, its file size is tested. If it exceeds 50 MB, it is moved to debut.txt.1, otherwise the log is appended to the old messages. An old debut.txt.1 is removed if it already exists.
2018-03-04Fix missing warningstream (or similar problem) (#7034)you
Use the --color command line parameter instead of a setting for coloured logs This fixes the missing warningstream bug, g_settings->get mustn't be used there. Also, the decision about en- or disabling log colours fits better to the command line parameters than minetest settings.
2018-01-09Fix off-by-one in log output line length (#6896)Pedro Gimeno
2017-06-11Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja
(#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
2016-04-21Make logging use a fixed-length buffer to avoid race conditions.Ekdohibs
Previously, race conditions occurred inside logging, that caused segfaults because a thread was trying to use an old pointer that was freed when the string was reallocated. Using a fixed-length buffer avoids this, at the cost of cutting too long messages over seveal lines.
2015-11-06Add server side ncurses terminalest31
This adds a chat console the server owner can use for administration or to talk with players. It runs in its own thread, which makes the user interface immune to the server's lag, behaving just like a client, except timeout. As it uses the same console code as the f10 console, things like nick completion or a scroll buffer basically come for free. The terminal itself is written in a general way so that adding a client version later on is just about implementing an interface. Fatal errors are printed after the console exists and the ncurses terminal buffer gets cleaned up with endwin(), so that the error still remains visible. The server owner can chose their username their entered text will have in chat and where players can send PMs to. Once the username is secured with a password to prevent anybody to take over the server, the owner can execute admin tasks over the console. This change includes a contribution by @kahrl who has improved ncurses library detection.
2015-10-27Add STATIC_ASSERT() macro and use itkwolekr
2015-10-25Fix out of bounds vector write in Logger::addOutput(ILogOutput *out)est31
Previously, the invocation of Logger::addOutput(ILogOutput *out) led to an out of bounds write of the m_outputs vector, resulting in the m_silenced_levels array being modified. Fortunately, the only caller of that method was android system logging, and only since a few commits ago.
2015-10-24Small logging refactor and additional optionsest31
-> Get rid of Logger::logToSystem and use normal downstream output system for android instead -> Give the downstream output system more information: enrich the log function of ILogOutput with information and add ICombinedLogOutput for easier use. -> Make Logger::getLevelLabel() static and public so that it can be used by downstream log output. -> Add g_ and m_ prefixes where required
2015-10-16Refactor thread utility interfacekwolekr
- Add "thr_" prefix to thread utility functions - Compare threadid_ts in a portable manner, where possible
2015-10-14Refactor loggingShadowNinja
- Add warning log level - Change debug_log_level setting to enumeration string - Map Irrlicht log events to MT log events - Encapsulate log_* functions and global variables into a class, Logger - Unify dstream with standard logging mechanism - Unify core.debug() with standard core.log() script API
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-05Use std::queue for HTTPFetchRequest and std::vector for log_output instead ↵Loic Blot
of std::list
2015-02-12Fix Android compile warningCraig Robbins
2015-01-06Fixes for androidsapier
Copy only minetest_game to apk by default Don't copy .git and .svn folders to apk Fix bouncing asset copy scrollbar due to long filepaths Reenable font scaling to fix broken menu on high dpi screens Implement minetest loglevel to android loglevel mapping Disable touch digging while moving around
2014-12-12Log: Silence errorstream during unittestskwolekr
2014-06-29Add support for Android 2.3+sapier
There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
2014-01-10Fixed minetest reliable udp implementation (compatible to old clients)sapier
2013-11-30Fix log threadname lookup handling not beeing threadsafesapier
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-05-20Add better trace peudo-loglevel supportPerttu Ahola
2011-11-29Add a third log output interface methodPerttu Ahola
2011-11-29Add log_remove_output and log_deregister_threadPerttu Ahola
2011-10-16Initially add small and tight logging facilityPerttu Ahola