F# Installation

Downloading the .Net Package

Use Nuget or an equivalent package manager to download and install ErrLog.IO.

Install-Package errlog.io
dotnet add package errlog.io
paket add errlog.io

 

Configuring the .Net Package

ErrLog.IO has a number of settings available, however only one is required in order to submit an error from F# - the API key.

Parameter Type Description
ErrLog.settings.apikey String Your API Key

 

Instantiating ErrLog.IO to Log Errors & Exceptions

The simplest way to send an error from F# to ErrLog.IO is via a try/with code block.

Before passing an exception to the logging method, remember to set the APIKey property.


	// set your api key
	ErrLog.settings.apikey <- @"[Your-api-key]";

	// catch an error
	try 
		PrintHelp
		printf "Enter a selection: ";
		let input  = Console.ReadLine();
		HandleInput(input)
		printfn ""
	with
		| ex -> ErrLog.logger.log ex |> ignore
	

 

Optional Parameters

ErrLog.IO has a number of settings available, however only one is required - the API key.

Optional Parameters

 

Discuss this article