Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bimedia-fr/architect-fastify-access-log
Access logger for architect fastify
https://github.com/bimedia-fr/architect-fastify-access-log
Last synced: 8 days ago
JSON representation
Access logger for architect fastify
- Host: GitHub
- URL: https://github.com/bimedia-fr/architect-fastify-access-log
- Owner: bimedia-fr
- License: apache-2.0
- Created: 2024-10-16T07:11:19.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T14:33:14.000Z (3 months ago)
- Last Synced: 2024-10-19T11:23:55.213Z (3 months ago)
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# architect-fastify-access-log
Access logger for architect fastify### Installation
```sh
npm install --save architect-fastify-access-log
```### Usage
Boot [Architect](https://github.com/c9/architect) :
```js
var path = require('path');
var architect = require("architect");var config = architect.loadConfig(path.join(__dirname, "config.js"));
architect.createApp(config, function (err, app) {
if (err) {
throw err;
}
console.log("app ready");
});
```Configure logging with Architect `config.js` :
```js
module.exports = [{
packagePath: "architect-access-log",
fmt: 'url=":url" method=":method" statusCode=":statusCode" delta=":delta" ip=":ip"'
}, './services'];
```