Logging con NLog e SQLite

Questo articolo spiega come ottenere una soluzione di logging portabile ed elegante grazie all’uso di NLog e SQLite, su piattaforma .NET e con poche configurazioni. NLog NLog è una libreria di logging leggera e gratuita che supporta l’ecosistema .NET (Silverlight, Windows Phone, ecc.). Costituisce un’opzione eccellente per un ampio range di scenari: dalle semplici utilities quotidiane a servizi critici di produzione. Consente di avere multipli target, siano essi file, database, console, rete o email. ...

May 6, 2014 · 2 min · Andrea Azzola

Logging with NLog and SQLite

This article explains how to achieve a portable and elegant logging solution with NLog and SQLite on the .NET platform with a few configurations. NLog NLog is a free, lightweight logging library for .NET. It supports many targets (files, databases, console, network, email, and more). nlog-project.org Install (NuGet Package Manager Console) PM> Install-Package NLog SQLite SQLite is a simple embedded database engine. No separate server daemon is required; the database is a single file (e.g., .db3). ...

May 6, 2014 · 2 min · Andrea Azzola

Dealing with Salesforce Maximum Debug Log Size

When working with Apex code that iterates a lot, you may encounter a truncated log. The error looks like this: MAXIMUM DEBUG LOG SIZE REACHED At the time of writing, the maximum allowed size for a debug log is 2 MB. The default monitoring level for Apex code includes a lot of clutter you usually don’t need (like METHOD_ENTRY, METHOD_EXIT). By common practice, you should put a log filter on the monitored user, or on the classes involved in the transaction by using an override flag. ...

July 18, 2013 · 1 min · Andrea Azzola

How to Log HTTP Requests with PHP

Note (2025): This post was written in 2010. The sample uses ereg, which has been deprecated in PHP 5.3 and removed as of PHP 7. Use preg_match or other modern approaches for production code. The article remains here for archival and historical interest. Sometimes you need to understand precisely how the HTTP request is submitted to the server. If you’re working with Salesforce.com, you probably don’t have easy or intuitive tools to understand how a message is serialized and sent by the runtime to the server. ...

May 27, 2010 · 1 min · Andrea Azzola