Wladimir J. van der Laan
bd83704ec6
Merge #13149 : Handle unsuccessful fseek(...):s
...
20ce5af
Print a log message if we fail to shrink the debug log file (practicalswift)
29c9bdc
Handle unsuccessful fseek(...):s (practicalswift)
Pull request description:
Handle unsuccessful `fseek(...)`:s.
**Note to reviewers:** What is the most appropriate course of actions for each of these unsuccessful `fseek(...)`:s?
Tree-SHA512: 5b3d82dbdd15d434d3f08dcb4df62888da4df8541d2586f56a4e529083005f6782c39e10645acd1ec403da83061bbfd8dbf2dddc66e09268d410ad0918c61876
2018-05-07 13:39:19 +02:00
practicalswift
20ce5af4c6
Print a log message if we fail to shrink the debug log file
2018-05-03 15:44:04 +02:00
practicalswift
29c9bdcc14
Handle unsuccessful fseek(...):s
2018-05-02 12:12:55 +02:00
practicalswift
0bd4cd398b
logging: remove unused return value from LogPrintStr
...
`LogPrintStr` returns the number of characters printed. This number is
doubled if both logging to console and logging to file is enabled. As
the return value is never used, I've opted to remove it instead of try
to fix it.
Credit: @laanwj
2018-05-02 11:25:20 +02:00
practicalswift
76f344de6d
logging: Fix potential use-after-free in LogPrintStr(...)
2018-05-02 10:43:17 +02:00
Jim Posen
8c2d695c4a
util: Store debug log file path in BCLog::Logger member.
...
This breaks the cyclic between logging and util.
2018-04-29 14:37:19 -07:00
Jim Posen
8e7b961388
scripted-diff: Rename BCLog::Logger member variables.
...
-BEGIN VERIFY SCRIPT-
sed -i "s/fileout/m_fileout/" src/logging.h src/logging.cpp
sed -i "s/mutexDebugLog/m_file_mutex/" src/logging.h src/logging.cpp
sed -i "s/vMsgsBeforeOpenLog/m_msgs_before_open/" src/logging.h src/logging.cpp
sed -i "s/logCategories/m_categories/" src/logging.h src/logging.cpp
sed -i "s/fPrintToConsole/m_print_to_console/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fPrintToDebugLog/m_print_to_file/" src/logging.h src/logging.cpp src/init.cpp src/test/test_bitcoin.cpp src/bench/bench_bitcoin.cpp
sed -i "s/fLogTimestamps/m_log_timestamps/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fLogTimeMicros/m_log_time_micros/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fReopenDebugLog/m_reopen_file/" src/logging.h src/logging.cpp src/init.cpp
sed -i "s/fStartedNewLine/m_started_new_line/" src/logging.h src/logging.cpp
-END VERIFY SCRIPT-
2018-04-29 14:37:17 -07:00
Jim Posen
1eac317f25
util: Refactor GetLogCategory.
...
Changing parameter types from pointers to references and uint32_t to
BCLog::LogFlags simplies calling code.
2018-04-29 14:37:17 -07:00
Jim Posen
3316a9ebb6
util: Encapsulate logCategories within BCLog::Logger.
2018-04-27 16:10:02 -07:00
Jim Posen
6a6d764ca5
util: Move debug file management functions into Logger.
2018-04-27 16:10:00 -07:00
Jim Posen
f55f4fcf05
util: Establish global logger object.
...
The object encapsulates logging configuration, and in a later commit,
set up routines will also be moved into the class.
2018-04-27 16:09:59 -07:00
Jim Posen
b77b6e2345
MOVEONLY: Move logging code from util.{h,cpp} to new files.
2018-04-18 10:05:05 -07:00