# Path: autopush/exceptions.py
# class LogCheckError(Exception):
#     """Exception raised on purpose to check logging functions"""
#     pass
# 
# Path: autopush/web/base.py
# AUTH_SCHEMES = ["bearer", "webpush", "vapid"]
# PREF_SCHEME = "webpush"
# DEFAULT_ERR_URL = ("http://autopush.readthedocs.io/en/latest/http.html"
#                    "#error-codes")
# class ThreadedValidate(object):
# class NotFoundHandler(BaseHandler):
# class BaseWebHandler(BaseHandler):
#     def __init__(self, schema):
#     def _validate_request(self, request_handler, *args, **kwargs):
#     def _call_func(self, result, func, request_handler):
#     def _track_validation_timing(self, result, request_handler, start_time):
#     def _decorator(self, func):
#         def wrapper(request_handler, *args, **kwargs):
#     def validate(cls, schema):
#     def get(self, *args, **kwargs):
#     def initialize(self):
#     def routers(self):
#     def prepare(self):
#     def options(self, *args, **kwargs):
#     def head(self, *args, **kwargs):
#     def _write_response(self, status_code, errno, message=None, error=None,
#                         headers=None,
#                         url=DEFAULT_ERR_URL,
#                         router_type=None,
#                         vapid=None):
#     def _validation_err(self, fail):
#     def _response_err(self, fail):
#     def _boto_err(self, fail):
#     def _router_response(self, response, router_type, vapid):
#     def _router_fail_err(self, fail, router_type=None, vapid=False, uaid=None):
#     def _write_validation_err(self, errors):
#     def _db_error_handling(self, d):
#     def _track_timing(self, status_code=None):


from marshmallow import Schema, fields, pre_load
from typing import Optional  # noqa
from autopush.exceptions import LogCheckError
from autopush.web.base import threaded_validate, BaseWebHandler
        return dict(err_type=req['path_kwargs'].get('err_type'))


class LogCheckHandler(BaseWebHandler):

    def authenticate_peer_cert(self):
        """LogCheck skips authentication checks"""
        pass

    @threaded_validate(LogCheckSchema)
    def get(self, err_type=None):
        # type: (Optional[str]) -> None
        """HTTP GET

        Generate a dummy error message for logging

        """
        if not err_type:
            err_type = "error"
        else:
            err_type = err_type.lower()
        if 'error' in err_type:
            self.log.error(format="Test Error Message",
                           status_code=418, errno=0,
                           client_info=self._client_info)
            self._write_response(418, 999, message="ERROR:Success",
                                 error="Test Error")
        elif 'crit' in err_type:
            try:
                raise LogCheckError("LogCheck")

# Path: autopush/exceptions.py
# class LogCheckError(Exception):
#     """Exception raised on purpose to check logging functions"""
#     pass
# 
# Path: autopush/web/base.py
# AUTH_SCHEMES = ["bearer", "webpush", "vapid"]
# PREF_SCHEME = "webpush"
# DEFAULT_ERR_URL = ("http://autopush.readthedocs.io/en/latest/http.html"
#                    "#error-codes")
# class ThreadedValidate(object):
# class NotFoundHandler(BaseHandler):
# class BaseWebHandler(BaseHandler):
#     def __init__(self, schema):
#     def _validate_request(self, request_handler, *args, **kwargs):
#     def _call_func(self, result, func, request_handler):
#     def _track_validation_timing(self, result, request_handler, start_time):
#     def _decorator(self, func):
#         def wrapper(request_handler, *args, **kwargs):
#     def validate(cls, schema):
#     def get(self, *args, **kwargs):
#     def initialize(self):
#     def routers(self):
#     def prepare(self):
#     def options(self, *args, **kwargs):
#     def head(self, *args, **kwargs):
#     def _write_response(self, status_code, errno, message=None, error=None,
#                         headers=None,
#                         url=DEFAULT_ERR_URL,
#                         router_type=None,
#                         vapid=None):
#     def _validation_err(self, fail):
#     def _response_err(self, fail):
#     def _boto_err(self, fail):
#     def _router_response(self, response, router_type, vapid):
#     def _router_fail_err(self, fail, router_type=None, vapid=False, uaid=None):
#     def _write_validation_err(self, errors):
#     def _db_error_handling(self, d):
#     def _track_timing(self, status_code=None):


# Path: autopush/web/log_check.py
from marshmallow import Schema, fields, pre_load
from typing import Optional  # noqa
from autopush.exceptions import LogCheckError
from autopush.web.base import threaded_validate, BaseWebHandler

        return dict(err_type=req['path_kwargs'].get('err_type'))


class LogCheckHandler(BaseWebHandler):

    def authenticate_peer_cert(self):
        """LogCheck skips authentication checks"""
        pass

    @threaded_validate(LogCheckSchema)
    def get(self, err_type=None):
        # type: (Optional[str]) -> None
        """HTTP GET

        Generate a dummy error message for logging

        """
        if not err_type:
            err_type = "error"
        else:
            err_type = err_type.lower()
        if 'error' in err_type:
            self.log.error(format="Test Error Message",
                           status_code=418, errno=0,
                           client_info=self._client_info)
            self._write_response(418, 999, message="ERROR:Success",
                                 error="Test Error")
        elif 'crit' in err_type:
            try:
                raise LogCheckError("LogCheck")

            except LogCheckError: