Workflow funktioniert nun wieder. Es gab Probleme nach Aenderungen.
Build and Publish Site / docker (push) Successful in 23s

ABER: Die Applikation funktioniert nur lokal. Die deployte Version geht noch nicht.
This commit is contained in:
2026-07-03 13:24:08 +02:00
parent 97a22cf704
commit b518ae8edb
1845 changed files with 292358 additions and 57 deletions
+47
View File
@@ -0,0 +1,47 @@
# abstract-logging
This module provides an interface for modules to include so that they can
support logging via an external logger that conforms to the standard Log4j
interface. One such logger is [Pino](https://npm.im/pino). This module
is intended for modules that are meant to be used by other modules.
Example:
```js
'use strict'
function AwesomeLibrary (options) {
this.log = (options.logger) ? options.logger : require('abstract-logging')
}
AwesomeLibrary.prototype.coolMethod = function () {
this.log.trace('AwesomeLibrary.coolMethod was invoked')
return {}
}
module.exports = AwesomeLibrary
```
## Interface
Available methods:
+ `fatal`
+ `error`
+ `warn`
+ `info`
+ `debug`
+ `trace`
All methods are no operation functions.
Some loggers, like [Pino](https://getpino.io/), implement a `child()` method. This method can be easily added to an `abstract-logging` instance when stubbing out such loggers:
```js
const logger = require('abstract-logging')
logger.child = () => logger
```
## License
[MIT License](http://jsumners.mit-license.org/)
+18
View File
@@ -0,0 +1,18 @@
'use strict'
function noop () { }
const proto = {
fatal: noop,
error: noop,
warn: noop,
info: noop,
debug: noop,
trace: noop
}
Object.defineProperty(module, 'exports', {
get () {
return Object.create(proto)
}
})
+25
View File
@@ -0,0 +1,25 @@
{
"name": "abstract-logging",
"version": "2.0.1",
"description": "A noop logger that conforms to the Log4j interface for modules to stub out internal logging",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jsumners/abstract-logging.git"
},
"keywords": [
"log",
"logging",
"logger",
"pino"
],
"author": "James Sumners <james.sumners@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/jsumners/abstract-logging/issues"
},
"homepage": "https://github.com/jsumners/abstract-logging#readme"
}
+17
View File
@@ -0,0 +1,17 @@
'use strict'
const assert = require('assert')
const one = require('./')
const two = require('./')
assert.notEqual(one, two)
assert.ok(one.info)
assert.equal(Function.prototype.isPrototypeOf(one.info), true)
two.info = () => 'info'
const result1 = one.info()
assert.equal(result1, undefined)
const result2 = two.info()
assert.equal(result2, 'info')