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
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
kinchungwong / spec_logtagmanager_20190303.md
Last active Mar 3, 2019
LogTagManager behavior as-if specification
View spec_logtagmanager_20190303.md
@kinchungwong
kinchungwong / log_config_string_format_20190220.md
Created Feb 27, 2019
Cached markdown for log config string format in logging_20190220
View log_config_string_format_20190220.md

Content used in: https://github.com/opencv/opencv/pull/13909

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
kinchungwong / cpp_preprocessor_operators_conflict.md
Created Feb 27, 2019
Main conflict between c++ expressions and preprocessor token operator techniques
View cpp_preprocessor_operators_conflict.md

Log message tag struct (optional)

Purpose

  • 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
kinchungwong / 0__README.txt
Created Feb 6, 2019
Preprocessor macro trick detecting argument is exactly 0, NULL, or nullptr
View 0__README.txt
Goal:
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:
https://stackoverflow.com/questions/32399191/va-args-expansion-using-msvc
@kinchungwong
kinchungwong / 0__logging_20190129_diff.diff
Last active Feb 5, 2019
Logging_20190129_diff_DO_NOT_USE
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 http://opencv.org/license.html.
#ifndef OPENCV_LOGGER_DEFINES_HPP
@kinchungwong
kinchungwong / logging_checklist_do_not_use.md
Created Jan 28, 2019
Outdated implementation checklist for logging revamp, DO NOT USE
View logging_checklist_do_not_use.md

Outdated implementation checklist for logging revamp

DO NOT USE

Contentious issues

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

struct LogTag {

@kinchungwong
kinchungwong / 0__IMPORTANT.md
Last active Jan 28, 2019
Thoughts - OpenCV Logger Revamp - 2019-01-28
View 0__IMPORTANT.md

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.
View 0__README.md

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

View 0__README.md
You can’t perform that action at this time.