MIT
Install flask and requests to run this example.
#!/usr/bin/env python | |
import time | |
from sys import stdin, stdout, argv | |
try: | |
from tkinter import * | |
except ImportError: | |
from Tkinter import * |
""" | |
Configures a logger to log <=INFO to stdout and >INFO to stderr | |
""" | |
import logging | |
import os | |
import sys | |
DEFAULT_FORMAT = '%(asctime)s - %(levelname)s - %(name)s - %(message)s' | |
NO_TIME_FORMAT = '%(levelname)s - %(name)s - %(message)s' |
I hereby claim:
To claim this, I am signing this object:
package de.siemering.spring.controllers; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.autoconfigure.web.ErrorController; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
@Controller | |
@RequestMapping("${error.path:/error}") | |
public class GlobalErrorController implements ErrorController { |
package de.siemering.gist; | |
import org.springframework.util.StopWatch; | |
public class SwHolder{ | |
private static StopWatch sw = new StopWatch(); | |
public static void start(String taskName) throws IllegalStateException { | |
sw.start(taskName); |