Skip to content

[Backend] Logger module - #675

Open
JavierRibaldelRio wants to merge 8 commits into
new-backendfrom
backend/logging-loger
Open

JavierRibaldelRio wants to merge 8 commits into
new-backendfrom
backend/logging-loger

Conversation

@JavierRibaldelRio

Copy link
Copy Markdown
Member
├── logger.rs              facade: re-exports CsvFile, TextFile, the JSON API and Error; module docs
└── logger/
    ├── README.md          module doc: API, guarantees, features and what's out of scope
    ├── error.rs           Error: one variant per failure, every one naming its file
    ├── target.rs          private: label, poisoning, explicit flush, courtesy flush on Drop
    ├── csv.rs             CsvFile + Row: header as contract, whole row or nothing, RFC 4180 quoting
    ├── text.rs            TextFile: one line verbatim, same vocabulary as CsvFile
    ├── json.rs            write_json/read_json and JsonDocument: atomic save via .tmp + rename
    ├── files.rs           feature files: copy/move/remove/size, creating dirs and naming both paths
    │   └── error.rs       files' own Error, carrying source and destination
    └── host.rs            feature host: HostInfo::collect() and open_file_limit(), nothing fails

The logger is an utility module, is not relly related to the backend, but will be useful.

Is better than use fs each time because custom errors are worthy while working with a decent amount of files

@pminmic pminmic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants