<commit_before>package main

import (
	//	"fmt"
	"github.com/julienschmidt/httprouter"
	"log"
	"moviesapp/controllers"
	"moviesapp/models"
	"net/http"
)

func main() {
	models.InitDB()
	router := httprouter.New()
	router.GET("/movies", controllers.GetMovies)
	router.POST("/movie/new", controllers.NewMovie)
	err := http.ListenAndServe(":8080", router)
	if err != nil {
		log.Panic("ListenAndServeErr: ", err)
	}

}<commit_msg>HTTP loging added<commit_after>package main

import (
	//	"fmt"
	"github.com/julienschmidt/httprouter"
	"log"
	"moviesapp/controllers"
	"moviesapp/logging"
	"moviesapp/models"
	"net/http"
	"os"
)

func main() {
	models.InitDB()
	router := httprouter.New()
	router.GET("/movies", controllers.GetMovies)
	router.POST("/movie/new", controllers.NewMovie)
	loggingHandler := logging.NewApacheLoggingHandler(router, os.Stderr)
	server := &http.Server{
		Addr:    ":8080",
		Handler: loggingHandler,
	}
	//err := http.ListenAndServe(":8080", router)
	err := server.ListenAndServe()
	if err != nil {
		log.Panic("ListenAndServeErr: ", err)
	}

}
{'fraction_non_alphanumeric': 0.16917293233082706, 'fraction_numerical': 0.011278195488721804, 'mean_word_length': 4.725806451612903, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1097098', 'n_tokens_mistral': 433, 'n_tokens_neox': 412, 'n_words': 67}