Comments (5)
I personally value at least having an option of human-readable logs a lot.
from groupbutler.
So what about this:
Make a customisable log function/module with levels mimicking ngx.log ones. In config you could set where and how you want the logs delivered: stdout (either json or human), telegram, prometheus, etc.
from groupbutler.
Yeah, most coventional logging libraries allow you to plug long handlers that do different things with the logs, e.g. print them, email them, transmit them.
What twisted does, which I really really like is the following:
log.error("new group {groupname}, {membercount}", name="whatever", membercount=34)
That way, you can have both human and machine readable logs at the same time. You can set up different handlers for these messages then.
More generally, I think it's a mistake to take things that make sense on a large e.g. facebook or netflix scale and try to emulate it "just because". JSON logs, ELK stack etc. probably doesn't make sense for most GB deployments, the official one even, where there is a single server, single process, and a "grep" command can search it in less than a millisecond.
from groupbutler.
I think dendrite has some kind of middle ground logging too, somewhat like this:
time="2018-06-23T16:15:41.788287481Z" level=warning msg="Didn't call Close on UserStreamListener" req.id=kQrtSRo4EDSm req.method=GET req.path=/_matrix/client/r0/sync
(Of course we donβt need millisecond precision but you get the idea)
But yeah, different log handlers. Telegram log handler could wrap some nice markdown around while stdout handler could look like that.
from groupbutler.
Since the issue was too broad and "logging" has "improved", I'm going to close this.
from groupbutler.
Related Issues (20)
- Bot reset command? HOT 2
- Link filter false flags on group internal message links HOT 1
- Please switch arab/rtl to non-us keyboard. HOT 1
- Is not working. HOT 2
- Extras commands don't work property HOT 1
- Setting media to "delete" doesn't delete the media
- Message forwards trigger media warning HOT 3
- Reports are not sent
- /dashboard Identifies only the creator of the group
- The /import command does not function when replying to the backup file
- Reporting and deleting to other administrators cannot be handled
- What's the error for a day before it works but it's showing a new error
- Warning on all t.me links, not just Telegram t.me HOT 1
- Username/Profile Image HOT 1
- Bug buttons commands at start of the bot
- Guard Watch for bots username changes HOT 1
- Night-Mode: revoke right to write at night HOT 1
- silent configuration HOT 4
- The bot reacts to commands for a long time or does not respond to commands at all
- Docker config HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groupbutler.