Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Rewrite Log service #410

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

renatomassaro
Copy link
Member

@renatomassaro renatomassaro commented Jul 28, 2018

This will be a rather large PR meant to enhance (but mostly rewrite) the Log service.

The biggest improvement is that now logs are structured data with pre-defined types, as opposed to the old Log system who was simply a string, void of any context.

So we changed from:

String: "localhost downloaded file Cracker.crc (1.0) from 1.2.3.4"

to

Struct: {type: :download_gateway, file_name: "Cracker.crc (1.0)", ip: "1.2.3.4", network_id: "::"}

To the end user this change is transparent (the struct will be "translated" to the string above anyways). But this allows for:

  • easier/better i18n support
  • enhanced log editing support / UI
  • easier support on log-based features (e.g. Log X should have field Y updated to contain Z)

  • Support structured Log format
  • Rewrite Log internals
  • LogPaginateRequest
  • LogFilterRequest
  • LogIndex
  • LogHenforcer
  • LogForgeRequest
    • LogForgeHenforcer
  • LogFactor
  • LogForgeProcess
    • Create
    • Edit
  • LogRecoverRequest
    • LogRecoverHenforcer
  • LogRecoverProcess
    • Global
    • Custom
  • LogAddedEvent
  • LogRecoveredEvent
  • LogRevisedEvent
  • LogDestroyedEvent

Incidental

  • Removed LogFactory
  • Completely removed ex_machina dependency 🎉
  • Added tgt_log_id on Process.t struct
  • Added set_relay/3 macro for Helix.Factor
  • Added SIGRETARGET, i.e. support for recursive process type (Support different types of processes lifecycles on TOP #324)
  • Added custom pre-hook at Process.Executable

This change is Reviewable

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 5 possible new issues (including those that may have been commented here).
  • 6 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/HackerExperience/Helix/pulls/410.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant