A simple log file format

后端 未结 8 1106
广开言路
广开言路 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:50

    Look at popular logfiles like /var/log/syslog on Unix to get ideas:

    MMM DD HH:MM:SS hostname process[pid]: message
    

    Example out of my syslog:

    May 11 12:58:39 raphaelm anacron[1086]: Normal exit (1 job run)
    

    But to give you the perfect answer we'd need more information about what you are logging, how much and how you want to read the logs.

提交回复
热议问题