]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/logger.ts
replace fs by fs-extra to prevent EMFILE error
[github/Chocobozzz/PeerTube.git] / server / helpers / logger.ts
index 480c5b49eac3df0ee1f2cc4766bab769f6b0ea15..ce6e38f158f5df297a0083dbc6692b69229bc0b3 100644 (file)
@@ -1,5 +1,5 @@
 // Thanks http://tostring.it/2014/06/23/advanced-logging-with-nodejs/
-import * as mkdirp from 'mkdirp'
+import { mkdirpSync } from 'fs-extra'
 import * as path from 'path'
 import * as winston from 'winston'
 import { CONFIG } from '../initializers'
@@ -7,7 +7,7 @@ import { CONFIG } from '../initializers'
 const label = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
 
 // Create the directory if it does not exist
-mkdirp.sync(CONFIG.STORAGE.LOG_DIR)
+mkdirpSync(CONFIG.STORAGE.LOG_DIR)
 
 function loggerReplacer (key: string, value: any) {
   if (value instanceof Error) {