I am using log4net in a try with expression and it is not working. I think something is missing but I don’t know what.
Here is my code :
let clusterIDArray = try
myfunction
with
log.Fatal("my function is not working")
log.Debug("my function is working")
Any ideas?
There are two mistakes in your code snippet:
try...with...block is not syntactically correct.Assuming that we catch exceptions and return an array in any case, a more idiomatic way of logging could be: