<commit_before>package com.jasonfelege.todo.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/hello")
public class HelloController {

	@RequestMapping("/")
	@Secured("ROLE_USER")
	public String helloWorld(Authentication auth, String token) {
		String out = "hello ";
		
		if (auth != null) {
			out += auth.getName();
		}
		
		out += " "  + token;
		
		return out;
	}
	
	@RequestMapping("/admin")
	@Secured("ROLE_ADMIN")
	public String helloAdmin(Authentication auth, String token) {
		String out = "admin ";
		
		if (auth != null) {
			out += auth.getName();
		}
		
		out += " "  + token;
		
		return out;
	}
}<commit_msg>add simple logging to hello controller<commit_after>package com.jasonfelege.todo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/hello")
public class HelloController {
	private static final Logger LOG = LoggerFactory.getLogger(HelloController.class);
	
	@RequestMapping("/")
	@Secured("ROLE_USER")
	public String helloWorld(Authentication auth, String token) {
		LOG.info("action=helloWorld authentication={} token={}", auth, token);
		
		String out = "hello ";
		
		if (auth != null) {
			out += auth.getName();
		}
		
		out += " "  + token;
		
		return out;
	}
	
	@RequestMapping("/admin")
	@Secured("ROLE_ADMIN")
	public String helloAdmin(Authentication auth, String token) {
		LOG.info("action=helloAdmin authentication={} token={}", auth, token);
		
		String out = "admin ";
		
		if (auth != null) {
			out += auth.getName();
		}
		
		out += " "  + token;
		
		return out;
	}
}
{'fraction_non_alphanumeric': 0.13495145631067962, 'fraction_numerical': 0.000970873786407767, 'mean_word_length': 4.409448818897638, 'pattern_counts': {'":': 0, '<': 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': '2407177', 'n_tokens_mistral': 690, 'n_tokens_neox': 604, 'n_words': 135}