Merge branch 'master' of https://github.com/log4js-node/log4js-node into inherit-parent-category-config

This commit is contained in:
Paul Harapiak 2019-05-04 12:12:29 -04:00
commit 301dcde705
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# log4js-node changelog
## 4.1.1
* [Add missing types for addLevels](https://github.com/log4js-node/log4js-node/pull/867) - thanks [@Ivkaa](https://github.com/Ivkaa)
* [Allow any return type for layout function](https://github.com/log4js-node/log4js-node/pull/845) - thanks [@xinbenlv](https://github.com/xinbenlv)
## 4.1.0
* Updated streamroller to 1.0.4, to fix a bug where the inital size of an existing file was ignored when appending

View File

@ -297,6 +297,11 @@ test('log4js configuration validation', (batch) => {
sandboxConfig.requires[
`${path.join(mainPath, '../../node_modules/nyc/bin/cheese')}`
] = testAppender('correct', result);
// in node v6, there's an extra layer of node modules for some reason, so add this one to work around it
sandboxConfig.requires[
`${path.join(mainPath, '../../node_modules/tap/node_modules/nyc/bin/cheese')}`
] = testAppender('correct', result);
const sandboxedLog4js = sandbox.require('../../lib/log4js', sandboxConfig);
sandboxedLog4js.configure({

3
types/log4js.d.ts vendored
View File

@ -17,7 +17,7 @@ export function getLogger(category?: string): Logger;
export function configure(filename: string): Log4js;
export function configure(config: Configuration): Log4js;
export function addLayout(name: string, config: (a: any) => (logEvent: LoggingEvent) => string): void;
export function addLayout(name: string, config: (a: any) => (logEvent: LoggingEvent) => any): void;
export function connectLogger(logger: Logger, options: { format?: Format; level?: string; nolog?: any; statusRules?: any[] }): any; // express.Handler;
@ -264,6 +264,7 @@ export interface Levels {
OFF: Level;
levels: Level[];
getLevel(level: string): Level;
addLevels(customLevels: object): void;
}
export interface Configuration {