Overhaul logging

Provide a proper logging effect that filters messages by log level
before generating them.
This commit is contained in:
Nathan McCarty 2025-01-09 15:48:24 -05:00
parent fb2f643efa
commit e2a26d9519
4 changed files with 140 additions and 61 deletions

View file

@ -1,4 +1,3 @@
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**
- [Unified interface for any day from any year](#unified-interface-for-any-day-from-any-year)
@ -14,8 +13,6 @@
- [Methods](#methods)
- [locate](#locate)
<!-- markdown-toc end -->
# Unified interface for any day from any year
This module provides some basic data types for building an application containing all my solutions to all of the parts of all the days across all of the years.
@ -28,6 +25,8 @@ module Runner
import Control.Eff
import Structures.Dependent.FreshList
import public Util.Eff
%default total
```
@ -43,7 +42,7 @@ A `Writer` effect is provided for logging, and a `Reader` effect is provided to
public export
PartEff : (err : Type) -> List (Type -> Type)
PartEff err =
[IO, Except err, WriterL "log" String, ReaderL "input" String]
[IO, Except err, Logger, ReaderL "input" String]
```
# The `Day` Record