https://github.com/webdad/amelie
(A)melie - (m)ore (e)asy (l)ogging (i)n (e)verything
https://github.com/webdad/amelie
Last synced: 3 months ago
JSON representation
(A)melie - (m)ore (e)asy (l)ogging (i)n (e)verything
- Host: GitHub
- URL: https://github.com/webdad/amelie
- Owner: WebDaD
- License: unlicense
- Created: 2017-10-05T10:50:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-20T13:45:57.000Z (over 8 years ago)
- Last Synced: 2025-10-11T09:09:25.545Z (8 months ago)
- Homepage:
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
(A)melie - (m)ore (e)asy (l)ogging (i)n (e)verything
================================
This Repository holds all concepts behind amelie and links to the reference solutions.
TODO:
- schemes neu machen
- xsd neu machen
- Add a raml for the server api
- Add some puml graphics
- CLI input parsing
- example arch
- Add json schemes
- Add XML xsd
- Add database-table-create files
- mssql
- Security:
- ip accetp list (single, range, wildcard)
- mac allow list (client may send it, if configured)
- certitifactes
- https://jwt.io/ https://www.npmjs.com/package/jsonwebtoken
- private public key
- Config-File for Clients / Server:
- Keys, Examples, Defaults
- What File is not important (json for node.js, app.config for c#...)
- examoples: json, xml, ini
- integrate examples, etc into README
- website under /docs
- [Concepts](#concepts)
- [A Log Entry](#a-log-entry)
- [ID](#id)
- [Source](#source)
- [Level](#level)
- [Message(140 chars)](#message140-chars)
- [message_long](#message_long)
- [TimeStamp](#timestamp)
- [Architecture](#architecture)
- [Clients](#clients)
- [Libraries](#libraries)
- [Servers](#servers)
- [Export Formats](#export-formats)
- [Paths](#paths)
- [Registries](#registries)
- [Server](#server)
- [Clients](#clients-1)
- [Pipes](#pipes)
- [Monitors](#monitors)
- [Stats](#stats)
- [Links](#links)
- [Servers](#servers-1)
- [Clients](#clients-2)
- [Libraries](#libraries-1)
- [Registry-Server](#registry-server)
- [Registry-Client](#registry-client)
- [Pipes](#pipes-1)
- [Stats](#stats-1)
- [Design](#design)
# Concepts
Here are the concepts used by amelie
## A Log Entry
Consists of
* ID
* Source
* Level
* Message(140 chars)
* message_long
* TimeStamp
### ID
This is a unique ID. It is generated by the server using an uuid-generator compliant to [RFC 4122](https://tools.ietf.org/rfc/rfc4122.txt)
## Source
The Source that has sent the log entry
### Level
A Log-Level. May be any string you like.
We recommend:
* info
* warn
* error
### Message(140 chars)
A short version of the log message. You can send it to the server or leave the work of trimming the long message to the server.
### message_long
The Log Message in its full beauty. May Contain tags (#tag), other sources (@source) and links (http:// / https:// ...)
### TimeStamp
A [RFC 3339](https://tools.ietf.org/rfc/rfc3339.txt) date-time string (with or without UTC offset)
# Architecture
amelie consists of logging clients and servers to save logfiles.
Addtional components are registries (server and client), pipes and stats-clients
## Clients
All Clients must be able to:
* Write a Log Entry to any server
* Take any string and convert it to log-entry fields using regex and a config
* Read the full Get API
* CLI must take standard in or be able to use one argument, others are parameters
* CLI can be able to use a file-watcher
* GUIs must have all fields avaiable, may be hidden.
* Have a config with the following settings to be used as defaults:
* Default Value for Level
* Default Value Source
* Default Value for a Server (IP:Port)
* Default Message Parser ((.) == message)
## Libraries
Are Extensions / Classes / modules / plugins for other programs to use.
They:
* Write a Log Entry to any server
* Take any string and convert it to log-entry fields using regex and a config
* Read the full Get API
* Have a config with the following settings to be used as defaults:
* Default Value for Level
* Default Value Source
* Default Value for a Server (IP:Port)
* Default Message Parser ((.) == message)
## Servers
All Servers must be reachable via http and share in common:
* Export Formats
* HTTP-Paths
All Server must accept and serve XML and JSON on all endpoints
### Export Formats
You can get your data as:
* json
* xml
* csv
* txt
### Paths
* POST /log (body: source, level, message (optional), message_long, timestamp (optional))
* GET /log - get all log entries
* GET /log/sources - get all sources
* GET /log/levels - get all Levels
* GET /log/tags - get all Tags
* GET /log/:id - get object with id
* GET /log/source/:source - get all entries to source
* GET /log/level/:level - get all entries to level
* GET /log/tag/:tag - get all entries to tag
* GET /search?query (query: source, level, from, to, tag, string, ...)
* GET /log/timestamp/:from/[:to] - get from, if no to then now
* GET /log/last - get newest Entry
* GET /log/last/:number - get newest entries, where number is the number of entries to get
## Registries
Can save logger api endpoints and display latest. And can search in the saves apis
### Server
A Registry must support the following Paths
* POST /server (body: api-endpoint, identifier) - Add a new endpoint
* GET /server - get list of servers connected
* DELETE /server - remove a server from the list
* PUT /server (body: api-endpoint, identifier) - Update an existing endpoint
* GET /server/:identifier/log - get all log entries of the endpoint
* GET /server/:identifier/log/sources - get all sources of the endpoint
* GET /server/:identifier/log/levels - get all Levels of the endpoint
* GET /server/:identifier/log/tags - get all Tags of the endpoint
* GET /server/:identifier/log/:id - get object with id of the endpoint
* GET /server/:identifier/log/source/:source - get all entries to source of the endpoint
* GET /server/:identifier/log/level/:level - get all entries to level of the endpoint
* GET /server/:identifier/log/tag/:tag - get all entries to tag of the endpoint
* GET /server/:identifier/search?query (query: source, level, from, to, tag, string, ...) of the endpoint
* GET /server/:identifier/log/timestamp/:from/[:to] - get from, if no to then now of the endpoint
* GET /server/:identifier/log/last - get newest Entry of the endpoint
* GET /server/:identifier/log/last/:number - get newest entries, where number is the number of entries to get of the endpoint
### Clients
All clients must be able to consume and use the full registry-server-api.
## Pipes
Consist of two parts:
1. Behaves like a Logger Server, but sends something (email, file, ftp) with the info
2. Watches for something and behaves like a client
## Monitors
Allow users to see changes in logs. This can be using sockets or creating an rss-feed.
Monitors are standalone and use existing API-Servers.
## Stats
Stats-Clients are special, as there are no limitations to them.
Just be sure not to overload the servers you perform stats against...
# Links
Here are the Links to all projects using these concepts. Entries that are not linked are planned, but not set up yet.
Feel Free to File a Pull-Request with more solutions or create one of the entries!
And please consider our naming convention:
`amelie-[type]-[language]`
## Servers
* amelie-server-php-mysql
* amelie-server-node.js-file
## Clients
* amelie-client-perl
* amelie-client-node.js-cli
* amelie-client-windows-console-application
* amelie-client-windows-winforms
* amelie-client-bash
* amelie-client-go
## Libraries
* amelie-lib-server-nodejs
* amelie-lib-server-php
* amelie-lib-server-csharp
* amelie-lib-server-go
* amelie-lib-client-nodejs
* amelie-lib-client-php
* [amelie-lib-client-csharp](https://github.com/WebDaD/amelie-lib-client-csharp)
* amelie-lib-client-go
## Registry-Server
* amelie-registry-server-php-mysql
* amelie-registry-server-node.js-file
## Registry-Client
* amelie-registry-client-perl
* amelie-registry-client-node.js-cli
* amelie-registry-client-windows-console-application
* amelie-registry-client-bash
* amelie-registry-client-go
## Pipes
* amelie-pipe-sending-mail-php
* amelie-pipe-receiving-mail-php
* amelie-pipe-sending-ftp-php
* amelie-pipe-receiving-ftp-php
## Monitors
* amelie-monitor-nodejs-socket-io
* amelie-monitor-php-rssfeed
## Stats
* amelie-stats-perl
* amelie-stats-r
# Design
Here are some simple Design Infos.
Main Color: #ff007f
Logo:
