Making NodeLogging build on Logging

This commit is contained in:
Fabian
2019-03-31 23:51:27 -04:00
parent 9417264850
commit 72f06a88d6
13 changed files with 24 additions and 745 deletions

View File

@ -1,7 +1,8 @@
import { Lock, ObservableInterface } from "@hibas123/utils";
import * as fs from "fs";
import * as path from "path";
import { Adapter, LoggingTypes, Message } from "./types";
import { Adapter, Message, LoggingTypes } from "@hibas123/logging";
const maxFileSize = 500000000;
@ -137,6 +138,7 @@ export class Files {
this.size += data.byteLength;
this.stream.write(data);
} catch (err) {
// TODO: Better error handling!
console.error(err);
this.initializeFile(false);
this.write_to_file(data);