src/main/kotlin/de/uapcore/lightpit/Logging.kt

Fri, 18 Dec 2020 16:16:54 +0100

author
Mike Becker <universe@uap-core.de>
date
Fri, 18 Dec 2020 16:16:54 +0100
changeset 165
b1fc8aed5969
parent 151
b3f14cd4f3ab
child 167
3f30adba1c63
permissions
-rw-r--r--

Add mailto link to the display name above comments - fixes #112

151
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 /*
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 * Copyright 2020 Mike Becker. All rights reserved.
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 *
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 * Redistribution and use in source and binary forms, with or without
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 * modification, are permitted provided that the following conditions are met:
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 *
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 * 1. Redistributions of source code must retain the above copyright
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 * notice, this list of conditions and the following disclaimer.
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 *
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 * documentation and/or other materials provided with the distribution.
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 *
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 */
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 package de.uapcore.lightpit
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 import org.slf4j.Logger
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 import org.slf4j.LoggerFactory
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 interface LoggingTrait
b3f14cd4f3ab migrate DataSourceProvider
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 inline fun <reified T : LoggingTrait> T.logger(): Logger = LoggerFactory.getLogger(T::class.java);

mercurial