Skip to content

Instantly share code, notes, and snippets.

Ryan Wong kinchungwong

Block or report user

Report or block kinchungwong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kinchungwong / md5_list_20190306.txt
Created Mar 7, 2019
MD5 hashes for installers on machine
View md5_list_20190306.txt
548ea319cbd6dda0e94d95580ad36038 7z1806-x64.exe
01d32ef6e8edb42d2eb332754d2e8dad cmake-3.13.4-win64-x64.msi
ce720e7a1de73d0650b86108392aa4dd doxygen-1.8.15-setup.exe
e2c6d562bd35352b73c00a744e9c07c6 fciv.exe
76e1a42f151357af452633c1fafa71fa Git-2.20.1-64-bit.exe
74e54197afee1918e2db890b05c460db KeePass-2.41-Setup.exe
983d8c71dd6eeed78012112b85734318 putty-64bit-0.70-installer.msi
0ffa44a86522f9a37b916b361eebc552 python-2.7.15.amd64.msi
ff258093f0b3953c886192dec9f52763 python-3.7.2-amd64.exe
20702a5967ac4994e6a6429c521ead1a vs_community__581740706.1521797069.exe
kinchungwong /
Last active Mar 3, 2019
LogTagManager behavior as-if specification
kinchungwong /
Created Feb 27, 2019
Cached markdown for log config string format in logging_20190220

Content used in:

Applies to: logging_20190220

Regarding log config for tags at startup-time

  • Config string format is similar to logcat.
    • imgproc:D imgcodecs.*:V *:S
  • Actual tag names (in library code) can contain the period (".")
    • (Undecided) "imgcodecs.tiff.decoder" or "imgcodecs.decoders.tiff"
kinchungwong /
Created Feb 27, 2019
Main conflict between c++ expressions and preprocessor token operator techniques

Log message tag struct (optional)


  • To allow passing in the tag name and the filtering threshold via one macro argument.
  • If we give up the dual purpose then it would simplify handling of the tag argument.
  • Its usage is open to design ideas, but it must be tolerant of current usage as well as incorrect usage.

Interpretation of logging macro argument

kinchungwong / 0__README.txt
Created Feb 6, 2019
Preprocessor macro trick detecting argument is exactly 0, NULL, or nullptr
View 0__README.txt
Define a preprocessor ("function-like") macro such that when the argument
is exactly one of: "0", "NULL", "nullptr" (without the quotes), the
macro is expanded to "1" (without the quotes), otherwise it should expand
to "0" instead.
References and useful information:
kinchungwong / 0__logging_20190129_diff.diff
Last active Feb 5, 2019
View 0__logging_20190129_diff.diff
diff --git a/modules/core/include/opencv2/core/utils/logger.defines.hpp b/modules/core/include/opencv2/core/utils/logger.defines.hpp
index b2dfc4170..11986d085 100644
--- a/modules/core/include/opencv2/core/utils/logger.defines.hpp
+++ b/modules/core/include/opencv2/core/utils/logger.defines.hpp
@@ -1,22 +1,44 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at
kinchungwong /
Created Jan 28, 2019
Outdated implementation checklist for logging revamp, DO NOT USE

Outdated implementation checklist for logging revamp


Contentious issues

What should be the type of "tag", for log filtering purpose?

struct LogTag {

kinchungwong /
Last active Jan 28, 2019
Thoughts - OpenCV Logger Revamp - 2019-01-28

Decision needed

  • Need to decide how we want to implement the "tag" feature of logging.
  • Check the "Accompanying a tag with each log message" section for some options.

About this prototype code

This prototype code illustrates the changes needed to support string prefix in LogLevelManager, compared to the earlier code in the previous Gist which only supports exact string matching.

What is enabled by this code change

You can’t perform that action at this time.