annotate src/goodjava/logging/LoggerFactory.java @ 1428:d21a7cf8fa9e

fix postgres check
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 24 Nov 2019 21:02:38 -0700
parents 27efb1fcbcb5
children 6fc083e1d08c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1402
27efb1fcbcb5 move luan.lib to goodjava
Franklin Schmidt <fschmidt@gmail.com>
parents: 1338
diff changeset
1 package goodjava.logging;
1337
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 public abstract class LoggerFactory {
1338
Franklin Schmidt <fschmidt@gmail.com>
parents: 1337
diff changeset
5 public static LoggerFactory implementation = new Log4jFactory();
1337
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 protected abstract Logger getLoggerImpl(Class cls);
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 protected abstract Logger getLoggerImpl(String name);
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 public static Logger getLogger(Class cls) {
1338
Franklin Schmidt <fschmidt@gmail.com>
parents: 1337
diff changeset
11 return implementation.getLoggerImpl(cls);
1337
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 }
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 public static Logger getLogger(String name) {
1338
Franklin Schmidt <fschmidt@gmail.com>
parents: 1337
diff changeset
15 return implementation.getLoggerImpl(name);
1337
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 }
8b61c8c4e07a remove slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 }