A simple log file format

后端 未结 8 1181
广开言路
广开言路 2021-01-12 07:16

I\'m not sure if it was asked, but I couldn\'t find anything like this.

My program uses a simple .txt file for log purposes, It just creates/opens a file and appends

8条回答
  •  佛祖请我去吃肉
    2021-01-12 07:40

    The 3 W's :

    When, what and where.

    For viewing something like multitail ("tail on steroids") http://www.vanheusden.com/multitail/

    or for pure ms windows try mtail http://ophilipp.free.fr/op_tail.htm

    And to keep your files readable, you might want to start new files when if the filesize of the current log file is over certain limit. Example:

    • activity0.log (1 mb)
    • activity1.log (1 mb)
    • activity2.log (1 mb)
    • activity3.log (1 mb)
    • activity4.log (205 bytes)

提交回复
热议问题