Leon Wilzer leon
  • I can use Markdown

  • Joined on 2022-03-06
leon pushed to Logging at KomuSolutions/WANessa 2024-02-15 21:55:24 +01:00
502d3a7b2d Merge branch 'Logging' of git.libre.moe:KomuSolutions/WANessa into Logging
ba0a1fc641 migrated to reworked config crate
cb024af91a some syntactic sugar for Option enum
a787dd93e5 Split config crate into multiple modules
Compare 4 commits »
leon commented on issue KomuSolutions/WANessa#28 2024-02-15 20:50:42 +01:00
CI (Re-)Consideration

Bonus Points:

  • variable(s) for rust-image(s)
    • automatically update variables according to the current rust version of the server. If not feasible, use the current rust version of the…
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 20:36:33 +01:00
Logging

While not a read lock, the Arc Type has this, which seems to be at odds with the whole immutability thing. https://doc.rust-lang.org/std/sync/struct.Arc.html#method.get_mut The docs don't seem to…

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 20:10:18 +01:00
Logging

While not a read lock, the Arc Type has this, which seems to be at odds with the whole immutability thing. https://doc.rust-lang.org/std/sync/struct.Arc.html#method.get_mut The docs don't seem to…

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 19:59:26 +01:00
Logging

The error in this case is the inability to report about warnings. This edge-case happens, when there is absolutely no way of informing the sysadmin of other errors, including CLI and E-Mail,…

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 19:12:33 +01:00
Logging

Seems sensible. It is also probably a good idea to split the config struct into multiple parts.

leon pushed to Logging at KomuSolutions/WANessa 2024-02-15 19:06:46 +01:00
a36a8a8b76 expanded macro to optionally accept &Config
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:43:28 +01:00
Logging

See 6e73c2a7b7

leon pushed to Logging at KomuSolutions/WANessa 2024-02-15 18:41:50 +01:00
6e73c2a7b7 added explicit ordinals; See #26
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging

It is mentioned here, that each level includes the previous ones, but including explicit ordinals is still a good idea.

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging

logging/src/lib.rs:102 will panic if any code requests write-lock on config::CONFIG and then panics. Consider using Arc to ensure immutability and accessibility to the configuration from any thread at any time

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging

logging/src/lib.rs:46 and logging/src/lib.rs:48 will panic if an IO error occurs. Maybe consider to not panic and print another error to the console, informing about the writing problems, rather than crashing the program as logging is not a crucial feature for the program's functioning

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:34:43 +01:00
Logging

-> Maybe just remove the setters and use an initializer to ensure immutability

leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:26:43 +01:00
Logging
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:02:04 +01:00
Logging
leon commented on pull request KomuSolutions/WANessa#26 2024-02-15 18:01:53 +01:00
Logging

I suggest some stability changes:

LogVerbosity doesn't specify values, but logging/src/lib.rs:75 assumes order -> Accidental reordering of the enum would lead to errors