-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENABLE_LOGGING 不应该默认开启 #254
Comments
INFO 级的 logging 默认是关闭的吧? |
我对 c/cpp 不熟悉,只是粗略的浏览了下,没有找到设置 logging 级别的地方,是通过配置文件设置的还是? 因日志已删除,无法提供,日志内容大致如下:
FYI: |
no_logging.h 下的定义是使所有的 logging 都不生效。 |
这个我看懂了,我会认为关掉那个选项就可以不输出也是因为这个文件
是我太草率了,抱歉! |
确认 Archlinux 发行版最新版本仍存在该问题。原因很有可能是 DLOG 被使用(详见输出)。 pacman -Qi librime
因日志文件太大,仅上传部分计数 cat rime.fcitx-rime.INFO | cut -d" " -f 4 | sort | uniq -c | sort -n | tail -n 20
|
正在准备向Archlinux 发行版提交反馈。因为我不太熟悉这个项目
|
已找到暂时的解决方案。参照 Glog 文档:https://hpc.nih.gov/development/glog.html#flags 以使用 fcitx 为例: # set log level to WARNING
GLOG_minloglevel=2 fcitx & |
log level還在其次。INFO級別的日誌對用家定位問題也有幫助。 |
@lotem 谢谢回复,我也是刚刚发现这个问题,现在在查找 C++ 关于 Debug 与 Release build 的相关内容。 这是 archlinux 关于打包 librime 的文件,不知道是否与本案相关? https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/librime 谢谢,已发现问题所在。原因是 Archlinux 发行版未使用 Release build. 解决方法是将 PKGBUILD 中
更改为
|
I read the discussion in https://bugs.archlinux.org/task/66584#comment189187 For your reference: The differences among those The fix in Gentoo actually supports a debug build variant corresponding to USE flag In the comments, Doug mentioned "release tarball". I'm sure everyone in the thread is aware that a release tarball, in the context of open-source software, doesn't refer to artifacts of a release build, but a source tarball that can be used with multiple build configurations. |
@lotem Much thanks for your comments! The bug is now fixed in archlinux in |
问题描述:
意外发现 /tmp 下有一个很大(200M+)的日志文件 /tmp/rime.fcitx-rime.INFO,打开看了下里面存有输入法输入的相关信息。
简单地浏览了下源码,似乎是因为 ENABLE_LOGGING 默认开启,发行版维护人员在打包的时候没有关掉导致。
因为目前不确定都有哪些发行版受影响,所以选择上报上游,希望上游能将这个选项的默认值改为 OFF。
另经过简单搜索,近 4 年前 fcitx-rime 项目曾有人报告过 “/tmp目录下面有局大的info文件”,但似乎并没有被解决。
目前已确定受影响的发行版:
ArchLinux https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/librime建议:
输入信息被记录到一个文件中是一个安全隐患,可以造成这种隐患的选项不应该默认开启。
The text was updated successfully, but these errors were encountered: