Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how do they log mission critical things in general. For instance, how often does a flight data recorder (FDR) log every state of mechanical components? Surely, they can't wait until something "interesting" to happen, right?


> I wonder how do they log mission critical things in general. For instance, how often does a flight data recorder (FDR) log every state of mechanical components? Surely, they can't wait until something "interesting" to happen, right?

There are different types of logging.

What you describe could be defined as an audit log intrinsic to system operation, which is quite a different thing than what the article describes.


Oh, I see. My bad then. Could you expand a bit more?


>> There are different types of logging.

> Oh, I see. My bad then. Could you expand a bit more?

Sure, I'll do my best.

The terms "logging" and "logs" are overloaded in the software industry and often used assuming context is known. Below are four examples illustrating same.

# Program Logs

This type of logging is what the article discusses and is what many developers are most familiar with. Usually, each entry is associated with a level (such as "debug", "info", "error", etc.) and capture state relevant to program execution at the point of log emission during the call tree is evaluation.

Usually they are used for postmortem analysis when a problem is discovered.

# Audit Logs

This type of logging serves to record changes in the persistent representation of key abstractions, often due to regulatory requirements. Your example of "a flight data recorder" is a great exemplar.

Audit logs for an entity are often independent of other entities and may not support the ability to replay the changes.

# Write-Ahead Logs[0]

This type of logging is frequently used as an implementation detail for various database technologies, such as RDBMS's.

WAL's are most often employed to address database crash recovery and intimately involved with transaction management.

# Event Sourcing[1]

While Event Sourcing might not be immediately thought of as a form of logging, it becomes clear it is when considering how the events are stored. Most discussions of Event Sourcing either describe it in terms of an Audit Log (like the referenced article does) or as an "append-only log."

0 - https://en.wikipedia.org/wiki/Write-ahead_logging

1 - https://martinfowler.com/eaaDev/EventSourcing.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: