如何保存聊天记录 [英] how to save chat history

查看:400
本文介绍了如何保存聊天记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个多用户聊天系统,这里我有一个问题是在客户端和服务器端保存聊天记录。请告诉我解决方案

i'm developing a multi user chat system, here i have a problem to save chat history at client side and at server side. please tell me solution about it

推荐答案

- 数据库

我建议整合应用 Apache Derby DB [ ^ ]



- 文本文件

我建议使用像Apache log4j [ ^ ]使用日志文件样式。您可以创建默认错误日志并添加另一个配置以将聊天内容保存在单独的文件中。这样可以确保只有相当数量的聊天条目在太旧时自动存储和删除。
- database
I recommend the app integrated Apache Derby DB[^]

- text file
I recommend to use a logging solution like Apache log4j[^] to work on with/in style of log files. You can create a default error-log and add another config to save the chat-content in a seperated file. That would make sure that only a decent amount of chat entries are stored and deleted automatically when too old.


这篇关于如何保存聊天记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆