Skip to content
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

[FEATURE REQUEST] 日志文件达到 18G #213

Open
cipchk opened this issue Jan 13, 2025 · 1 comment
Open

[FEATURE REQUEST] 日志文件达到 18G #213

cipchk opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@cipchk
Copy link

cipchk commented Jan 13, 2025

Why this feature?

openim-server 现在的日志文件有 18G:

[root@iZt4nj9oywqboncdslifuiZ dc6c4af08f648df22f8d9c0c7d548fc7082f59af52cd86a820305c244b115e4b]# sudo du -sh /var/lib/docker/containers/dc6c4af08f648df22f8d9c0c7d548fc7082f59af52cd86a820305c244b115e4b/* | sort -rh | head -n 10
18G     /var/lib/docker/containers/dc6c4af08f648df22f8d9c0c7d548fc7082f59af52cd86a820305c244b115e4b/dc6c4af08f648df22f8d9c0c7d548fc7082f59af52cd86a820305c244b115e4b-json.log

日志相关的 ENV 配置:

IMENV_LOG_ISSTDOUT=true                         # Log output to standard out
IMENV_LOG_REMAINLOGLEVEL=3                                # Log level: 3 for production environments, 6 for test environments

这一情况都是当推送失败时纪录 WARN 日志,会把整个群的 USER ID 写入日志,群成员越大这个日志越是可怕 。

offlinePushInfo:{title:\"NFTalk\"  desc:\"You have a new message\"  iOSPushSound:\"+1\"  iOSBadgeCount:true}  ex:\"{\\\"alt\\\":10708}\"}  userIDs:\"10246\"  userIDs:\"16776\"  userIDs:\"16957\"  userIDs:\"11503\"  userIDs:\"15612\"  userIDs:\"16659\"  userIDs:\"19175\"  userIDs:\"19251\"  userIDs:\"15508\"  userIDs:\"17068\"  userIDs:\"10801\"  userIDs:\"11266\"  userIDs:\"11706\"  userIDs:\"13206\"  userIDs:\"13533\"  userIDs:\"14244\"  userIDs:\"16972\"  userIDs:\"19338\"  userIDs:\"12449\"  userIDs:\"14177\"  userIDs:\"15779\"  userIDs:\"17776\"  userIDs:\"18675\"  userIDs:\"10091\"  userIDs:\"10289\"  userIDs:\"10520\"  userIDs:\"12461\"  userIDs:\"14322\"  userIDs:\"14832\"  userIDs:\"10509\"  userIDs:\"11056\"  userIDs:\"13881\"  userIDs:\"14435\"  userIDs:\"16185\"  userIDs:\"17473\"  userIDs:\"18419\"  userIDs:\"12141\"  userIDs:\"16071\"  userIDs:\"17452\"  userIDs:\"17930\"  userIDs:\"19467\"  userIDs:\"12262\"  userIDs:\"13735\"  userIDs:\"13846\"  userIDs:\"15197\"  userIDs:\"10051\"  userIDs:\"10722\"  userIDs:\"10875\"  userIDs:\"13891\"  userIDs:\"14501\"  userIDs:\"18526\"  userIDs:\"14477\"  userIDs:\"14699\"  userIDs:\"15855\"  userIDs:\"17310\"  userIDs:\"12936\"  userIDs:\"13858\"  userIDs:\"15560\"  userIDs:\"18182\"  userIDs:\"13732\"  userIDs:\"14633\"  userIDs:\"16213\"  userIDs:\"10469\"  userIDs:\"10820\"  userIDs:\"14349\"  userIDs:\"14961\"  userIDs:\"17135\"  userIDs:\"17962\"  userIDs:\"10416\"  userIDs:\"12966\"  userIDs:\"16803\"  userIDs:\"17510\"  userIDs:\"17768\"  userIDs:\"11023\"  userIDs:\"11284\"  userIDs:\"11757\"  userIDs:\"12666\"  userIDs:\"18359\"  userIDs:\"10028\"  userIDs:\"13155\"  userIDs:\"13719\"  userIDs:\"10878\"  userIDs:\"10929\"  userIDs:\"11125\"  userIDs:\"11801\"  userIDs:\"16246\"  userIDs:\"16769\"  userIDs:\"17435\"  userIDs:\"18565\"  userIDs:\"19306\"  userIDs:\"10452\"  userIDs:\"12160\

Suggested Solution

docker-compose.yaml 增加 logging 节点,或 IMENV_LOG_REMAINLOGLEVEL 能支持除 36 之外的选择。

Additional Information

No response

@cipchk cipchk added the enhancement New feature or request label Jan 13, 2025
@cipchk cipchk changed the title [FEATURE REQUEST] 建议增加 logging 配置 [FEATURE REQUEST] 日志文件达到 18G Jan 13, 2025
@icey-yu
Copy link
Member

icey-yu commented Jan 16, 2025

We optimize log print in push msg:
openimsdk/open-im-server#3066

In fact, you can set the log level to 1-6, with the levels corresponding to FATAL, ERROR, WARN, INFO, DEBUG, and enable database logs, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants