Skip to content

A simple Wikipedia Search Application built to demonstrate logging in Go with Zerolog

License

Notifications You must be signed in to change notification settings

betterstack-community/wikipedia-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wikipedia Search (Logging in Go Demo)

This repository contains examples of Logging with Zerolog and Logging with Zap in a simple Go web application to give you an idea of how you can get started with either package in your own projects.

Here are the accompanying tutorials:

Screenshot or GIF of the application in action

🟢 Prerequisites

You must have the latest version of Go installed on your machine. This project was tested against v1.20.

📦 Getting started

  • Clone this repo to your machine:
git clone https://github.com/betterstack-community/wikipedia-demo
  • cd into the project folder and switch to the relevant branch:
git checkout zerolog
git checkout zap
  • Run go mod tidy to download dependencies.
  • Execute the command below to start the development server:
go build && ./wikipedia-demo
  • Visit http://localhost:3000 in your browser.
  • Enter a search query, and view the corresponding logs in your console and in the wikipedia-demo.log file.

Application Logs

⚖ License

The code used in this project and in the linked tutorial are licensed under the Apache License, Version 2.0.

About

A simple Wikipedia Search Application built to demonstrate logging in Go with Zerolog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published