mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Add (smart) logging facility
By means of "Use Debug Log" UCI option it is possible to toggle the logging of std::cout to file "out.txt" while preserving the usual output to stdout. There is zero overhead when logging is disabled and we achieved this without changing a single line of exsisting code, in particular we still use std::cout as usual. The idea and part of the code comes from this article: http://groups.google.com/group/comp.lang.c++/msg/1d941c0f26ea0d81 No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -60,4 +60,6 @@ private:
|
||||
sys_time_t t;
|
||||
};
|
||||
|
||||
extern void logger_set(bool b);
|
||||
|
||||
#endif // !defined(MISC_H_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user