mirror of
https://github.com/directus/directus.git
synced 2026-02-01 21:04:59 -05:00
* Start on GraphQL "2.0", add methodnotallowed exceptoin * Fix relative file pointer in peer dep * [WIP] Add pre-filtered schema to SchemaOverview * Use root schema as is, add reduce-schema util * Use reduceSchema in the wild * Base schema on local reduced schema * Remove todo * Use graphql-compose to build out schema * Start restructuring resolvers * Add create mutation * Return boolean true for empty create mutation selections * Add update mutation * Add delete mutation * Add system/items scoping * Fix merge conflicts for real now * Use system services, rename ids->keys * Start on docs on mutations * Updates to match main * Add fetch-by-id * Add one/many resolvers for mutations * Check system collection rows for singleton * Fix resolver extraction for single read * Share delete return type * Add comments * Use collection root name for readable type * Add specs endpoint for GraphQL SDL * Update docs * Add note on SDL spec * Fix delete single example * Remove package-lock * Fix collection read scoping in non-read
14 lines
317 B
TypeScript
14 lines
317 B
TypeScript
import pino, { LoggerOptions } from 'pino';
|
|
import env from './env';
|
|
|
|
const pinoOptions: LoggerOptions = { level: env.LOG_LEVEL || 'info' };
|
|
|
|
if (env.LOG_STYLE !== 'raw') {
|
|
pinoOptions.prettyPrint = true;
|
|
pinoOptions.prettifier = require('pino-colada');
|
|
}
|
|
|
|
const logger = pino(pinoOptions);
|
|
|
|
export default logger;
|