db structure abstraction; async collection; update/insert queries; model saving

This commit is contained in:
garrettmills
2020-07-06 09:53:03 -05:00
parent eddb4f1fbe
commit e4f5da7ac6
73 changed files with 3301 additions and 57 deletions

View File

@@ -45,7 +45,11 @@ class Logging {
const message = this.build_message(level, output)
if ( this._level >= level || force ) {
for ( const logger of this._loggers ) {
logger.write(message)
try {
logger.write(message)
} catch (e) {
console.error('logging error', e)
}
}
}
}

View File

@@ -0,0 +1,5 @@
import { make } from '../../../../di/src/global.ts'
import { Logging } from './Logging.ts'
const logger = make(Logging)
export { logger }

View File

@@ -1,11 +1,11 @@
enum LoggingLevel {
Silent = 0,
Success = 1,
Error = 1,
Warning = 2,
Info = 3,
Debug = 4,
Verbose = 5,
Error = 2,
Warning = 3,
Info = 4,
Debug = 5,
Verbose = 6,
}
const isLoggingLevel = (something: any): something is LoggingLevel => {