Logging
Copper provides the clogger
package that allows structured logging in both dev and prod environments. It integrates deeply with cerrors
to produce insightful logs with detailed error messages.
The code snippet above may produce the following log statement:
Note that the errors are fully unwrapped, each providing a level of detail on what may have gone wrong. Since each error is tagged, we see helpful information like "engine_number=3" and "tank=1".
Last updated
Was this helpful?