mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
only show extra params when they are actually present
This commit is contained in:
parent
1b19ff415a
commit
8f51a9d6d7
2 changed files with 8 additions and 1 deletions
|
|
@ -238,6 +238,13 @@ export class DittoConf {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The logging configuration for the Ditto server. The config is derived from
|
||||
* the DEBUG environment variable and it is parsed as follows:
|
||||
*
|
||||
* `DEBUG='<jsonl|pretty>:<minimum log level to show>:comma-separated scopes to show'`.
|
||||
* If the scopes are empty (e.g. in 'pretty:warn:', then all scopes are shown.)
|
||||
*/
|
||||
get logConfig(): {
|
||||
fmt: 'jsonl' | 'pretty';
|
||||
level: string;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@ export const createLogiHandler = (conf: DittoConf, defaultHandler: LogiHandler)
|
|||
'color: unset',
|
||||
);
|
||||
|
||||
console.log(remaining.map((itm) => pair(...itm)).join('\n'));
|
||||
if (remaining.length) console.log(remaining.map((itm) => pair(...itm)).join('\n'));
|
||||
console.groupEnd();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue