Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.development > #8371

System log and format of log entries

From "James Harris" <james.harris.1@gmail.com>
Newsgroups alt.os.development
Subject System log and format of log entries
Date 2015-07-14 11:42 +0100
Organization A noiseless patient Spider
Message-ID <mo2p03$kme$1@dont-email.me> (permalink)

Show all headers | View raw


Anyone have a good approach to laying out entries in an OS system log?

Windows uses some binary internal format (and puts entries in there only 
when it feels like it and when the wind is in the west). Unix uses a 
pure-text format which begins with the date and time.

I am thinking to include two independent sources of time in each log 
entry:

1. The normal date and time in a collatable format such as
      yyyymmdd_hhmmss.sss[timezone]

2. A timestamp from an upcounter such as the TSC or similar

The reason for inclusion of the latter is the weaknesses of the former, 
i.e.

* datetimes may be unknown
* datetimes may be incorrect
* datetimes may only update infrequently such as every second
* datetimes may be changed

All of those weaknesses can make it difficult or impossible usefully to 
determine how long it was between one entry and another. A fine-grained 
upcounter (an unsigned number that increases with each tick of some 
clock) adds the extra detail.

So basically, each log entry is to have

  1. the timestamp
  2. the datetime
  3. the text of the log entry

How does that seem to you? Any suggestions to do something different to 
that?

Of course, there can be the need to alter one or other of the sources of 
those times. Someone may set a new datetime and it is possible to reset 
the upcounter. I am thinking that just one source would be altered at a 
time in the log so that it would always be possible to see and account 
for the changes - but that's a detail.

Another detail is how to represent a log entry but I'll post about that 
separately.

Any thoughts on the principles of having OS log entries include the 
fields as described above?

James

Back to alt.os.development | Previous | NextNext in thread | Find similar | Unroll thread


Thread

System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-14 11:42 +0100
  Re: System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-14 11:59 +0100
  Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 03:23 -0400
    Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 22:46 -0400
  Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 03:33 -0400
    Re: System log and format of log entries Peter Cheung <mcheung63@gmail.com> - 2015-07-15 00:47 -0700
    Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 22:42 -0400
      Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-16 12:18 -0700
        Re: System log and format of log entries "Mike Gonta" <mikegonta@gmail.com> - 2015-07-16 15:50 -0400
          Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-16 13:24 -0700
            Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-17 06:39 -0400
              Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-17 10:27 -0700
                Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-21 16:38 -0700
  Re: System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-15 15:15 +0100

csiph-web