Method and device for storing logs
The embodiment of the invention discloses a method and a device for storing logs. The method comprises the following steps: when a current log of a mainstream business is obtained at a preset log output point, establishing a storage thread of the current log; caching the current log into an informat...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The embodiment of the invention discloses a method and a device for storing logs. The method comprises the following steps: when a current log of a mainstream business is obtained at a preset log output point, establishing a storage thread of the current log; caching the current log into an information queue through the storage thread; obtaining the current log from the information queue; storingthe current log into a local file.
本发明实施例公开了种日志存储方法及装置,所述方法包括:当在预先设置的日志输出点处获取到主线业务的当前日志时,建立所述当前日志的存储线程;通过所述存储线程将所述当前日志缓存到消息队列中;在所述消息队列中获取所述当前日志;将所述当前日志存储到本地文件中。 |
---|