Logging helper slots for Magic, allowing you to inject your own logging implementation, giving you the ability to create log entries from Hyperlambda. To use package go to https://polterguy.github.io
$ dotnet add package magic.lambda.loggingLogging wrapper slots for Magic. More specifically, this project provides the following slots.
By default, this project will log into your magic.log_entries database/table, using either MySQL, PostgreSQL, or
Microsoft SQL Server. This allows you to use SQL to generate statistics on top of your logs. An example of
logging an info piece of information can be found below.
log.info:Howdy world from magic.lambda.logging!
Notice - You can supply content to your log item two different ways. Either as a piece of string, or if you choose to set its value to nothing, it will concatenate all children node's values, after having evaluated it as a lambda object. This allows you to create rich log entries, based upon evaluating the children of the log invocation. This gives you a convenience shortcut to create log entries that have strings concatenated as their content, without having to manually concatenate them yourself. An example of the latter can be found below.
.a:foo bar
log.info
.:'A value is '
get-value:x:@.a
The source code for this repository can be found at github.com/polterguy/magic.lambda.logging, and you can provide feedback, provide bug reports, etc at the same place.