Permalink
Browse files

update https

  • Loading branch information...
joesonw committed Aug 4, 2017
1 parent c09dfca commit b7916f1ef08f293c697500a252cdca058608060a
Showing with 36 additions and 11 deletions.
  1. +5 −5 README.md
  2. +5 −5 docs/index.md
  3. +7 −0 logger.yml
  4. +1 −1 src/appenders/FileAppender.test.ts
  5. +17 −0 src/core/LogManager.test.ts
  6. +1 −0 src/core/LogManager.ts
@@ -1,11 +1,11 @@
<p align="center">
<a href="http://t2ee.org">
<img width="200" src="http://t2ee.org/img/logos/t2ee.png">
<a href="//t2ee.org">
<img width="200" src="//t2ee.org/img/logos/t2ee.png">
</a>
</p>
<p align="center">
<a href="http://sl4js.t2ee.org">
<img width="200" src="http://t2ee.org/img/logos/sl4js.png">
<a href="//sl4js.t2ee.org">
<img width="200" src="//t2ee.org/img/logos/sl4js.png">
</a>
</p>

@@ -22,7 +22,7 @@

A simple logging library yet with powerful functionalities. Customizable appenders and rich output format. Share configurations through application.

For detailed introduction and examples, please visit [sl4js.t2ee.org](http://sl4js.t2ee.org)
For detailed introduction and examples, please visit [sl4js.t2ee.org](//sl4js.t2ee.org)


# Installation
@@ -1,11 +1,11 @@
<p align="center">
<a href="http://t2ee.org">
<img width="200" src="http://t2ee.org/img/logos/t2ee.png">
<a href="//t2ee.org">
<img width="200" src="//t2ee.org/img/logos/t2ee.png">
</a>
</p>
<p align="center">
<a href="http://sl4js.t2ee.org">
<img width="200" src="http://t2ee.org/img/logos/sl4js.png">
<a href="//sl4js.t2ee.org">
<img width="200" src="//t2ee.org/img/logos/sl4js.png">
</a>
</p>

@@ -75,7 +75,7 @@ As for chacaters(placeholders) supported, see chart below.

character | usage | description
----------|--------------------|-------------
d | `%d`, or `%d{FORMAT}`, FORMAT is a valid (momentjs)[http://momentjs.com/] format | it displays the date.
d | `%d`, or `%d{FORMAT}`, FORMAT is a valid (momentjs)[//momentjs.com/] format | it displays the date.
c | `%c{PATTERN}`, PATTERN is any other valid pattern | composite, it allows to pad multiple patterns all together.
n | `%n` | appender name
m | `%m` | message
@@ -0,0 +1,7 @@
default: console
level: LogLevel.DEBUG
appenders:
- name: console
appender: console
pattern: '%d{YYYY-MM-DD HH:mm:ss.SSS} %-7c{[%l]} %10n %5p - %2w %M'
level: LogLevel.DEBUG
@@ -7,7 +7,7 @@ import * as fs from 'fs';
import * as Q from 'q';
import test from 'ava';

test('ConsoleAppender', async t => {
test('FileAppender', async t => {
let currentMessage = null;
console.log = (message) => {
currentMessage = message;
@@ -0,0 +1,17 @@
import 'reflect-metadata';
import * as path from 'path';
import LogManager from './LogManager';
import {
ConfigurationStore,
} from '@t2ee/core';
import test from 'ava';

test('LogManager', t => {
let currentMessage = null;
console.log = (message) => {
currentMessage = message;
}
ConfigurationStore.loadFile(path.resolve(__dirname, '../../logger'));
const logger = LogManager.getLogger();
t.not(logger, null);
});
@@ -40,6 +40,7 @@ export class LogManager {
return instance.loggers[name];
}

console.log(instance.configuration)
const isRoot: boolean = name === instance.configuration.default;

const config: AppenderConfiguration =

0 comments on commit b7916f1

Please sign in to comment.