Posts

How to Log with CloudWatch Logs, ASP.NET and Log4Net

The Apache Software Foundation’s Logging Services project aims to provide a group of cross-language logging services that allows producers of software to debug and audit their software. The project includes Log4j, Log4j Audit, Log4j Kotlin, Log4j Scala, Log4cxx, Log4Net and Log4PHP.

We’ll spend our time in this tutorial with Log4Net, the .NET port of Log4j. We’ll build a very basic API application to demonstrate how .NET apps can use Log4Net to output logs to Amazon CloudWatch Logs.

Logging to Amazon CloudWatch Logs with ASP.NET

Photo by Sebastian Pociecha on Unsplash

Observability is the procedure of analyzing a software system by collecting and analyzing its data. Observability allows you to understand what is happening inside the system in order to debug software issues, analyze a system’s performance, identify usage patterns, triage security incidents, et al.

Logging is an important aspect of observability as logging is a crucial mechanism in capturing the data that needs to be analyzed. In this series, we’ll go over logging to Amazon CloudWatch Logs using three popular .NET logging platforms – Serilog, Log4Net and NLog.

How to Log with ASP.NET, NLog and Amazon CloudWatch Logs

NLog is known for being a free, flexible logging solution which supports structured, as well as traditional logging within the .NET ecosystem. NLog has logging targets for the console, for files, and for databases. However, in this tutorial, we’ll use ASP.NET along with NLog to store logs in CloudWatch Logs.

Photo by Robert Larsson on Unsplash

The Solution

In this tutorial, we will build a basic ASP.NET API, with the goal of logging to Amazon CloudWatch Logs using NLog.

Introduction to Amazon Transcribe

Use Amazon Transcribe to automatically convert speech to text. With Amazon Transcribe, generate meeting notes and subtitles to give workplace meetings more meaning and be more inclusive. In addition, Amazon Transcribe can be used to monitor conversations for inappropriate content and to also generate clinical documentation.

Photo by Oscar Ivan Esquivel Arteaga on Unsplash

The Solution

In this tutorial, we will provide a simple example where we convert a short audio clip of speech to text using Amazon Transcribe with .NET.

How to Log to CloudWatch Logs using ASP.NET and Serilog

Serilog is well known in the .NET community as a simple, versatile provider for structured logging. Combine Serilog with CloudWatch Logs which enables the centralization of all your logs within a highly scalable service and you have a very powerful solution. In this article, we’ll integrate ASP.NET, Serilog and CloudWatch Logs to form a powerful debugging, troubleshooting and monitoring solution.

Photo by Mildly Useful on Unsplash

The Solution

In this tutorial, we will provide a simple example where we log to Amazon CloudWatch Logs using ASP.NET and Serilog.

How to Change the PATH Variable in Amazon Linux

In Amazon Linux 2, as well as Linux in general, the PATH variable determines where the OS looks for executable files. This variable can be modified and allows for flexibility in organizing your directory structure. For example, let’s say that your OS is based off an image and all executable files that are installed with the image are located at the path, /bin. A user could then install executable files at the path of, /home/[username]/bin. And, the user could then modify the PATH variable, so that the executable files could run at the command line while only referencing the file name.

Introduction to Amazon Artificial Intelligence Services

Photo by Jason Leung on Unsplash

Artificial intelligence is everywhere, there’s machine learning, supervised and unsupervised, there’s large language models and then there’s data science, etc, etc… If you are a dev, where do you even start? Fortunately, AWS has simplified artificial intelligence processes into easily consumable services. And, in this multipart series, we’ll take you through some introductory tutorials to start you on the path of learning how to use Amazon artificial intelligence services.

Introduction to Amazon Polly

Amazon Polly uses deep learning to synthesize human speech from text. With Amazon Polly you can convert meeting notes, research papers and magazine and newspaper articles to a digital audio format. And, with support for various voices and dozens of languages, Amazon Polly can bring your textual content to life in minutes.

Photo by Ilona Frey on Unsplash

The Solution

In this tutorial, we’ll bring you through a simple example where we show you how to synthesize speech from text and store the synthesized speech in a digital audio format like MP3.

Introduction to Amazon Rekognition

Amazon Rekognition is a highly featured, visual analysis tool that relies on pre-trained machine learning models. Amazon Rekognition enables you to analyze images as well as video without being a machine learning expert. Amazon Rekognition can flag inappropriate content, differentiate fake and real faces, can identify celebrities and can extract text. When analyzing video, Amazon Rekognition can also detect and analyze motion.

Photo by Nicholas Green on Unsplash

The Solution

In this tutorial, we’ll bring you through a simple app that analyzes a picture and counts the number of faces within it.

Introduction to Amazon Translate

Amazon Translate is an AWS machine learning service that is based upon deep learning and let’s you translate textual data from one language, to another. Amazon Translate has support for 75 different languages and can be used for translating meeting notes, translating telephone transcripts, or providing website search constructs in various languages.

Photo by Daniel Prado on Unsplash

The Solution

In this tutorial, we’ll bring you through a simple example where we show you how to translate textual data from English to Spanish.