https://github.com/ofceab-studio/loggme
Always receive logs about what happens on your apps
https://github.com/ofceab-studio/loggme
dart logging
Last synced: 4 months ago
JSON representation
Always receive logs about what happens on your apps
- Host: GitHub
- URL: https://github.com/ofceab-studio/loggme
- Owner: Ofceab-Studio
- License: mit
- Created: 2024-01-10T03:43:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-17T23:53:46.000Z (about 1 year ago)
- Last Synced: 2025-06-20T23:40:55.626Z (about 1 year ago)
- Topics: dart, logging
- Language: Dart
- Homepage: https://pub.dev/packages/loggme
- Size: 41 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# loggme
_A little package be relaxed when your apps are running on production. Always receive logs about what happens there through Telegram, slack, and any other HTTP REST API._
## Features
- [x] Support logging through Telegram
- [x] Support logging through Slack
- [x] Support logging through custom REST API endpoints
## Example
```dart
void main() async {
final dotEnv = DotEnv()..load();
final telegramChannelsSenders = [
TelegramChannelSender(
botId: dotEnv['TELEGRAM_BOT_ID']!, chatId: dotEnv['TELEGRAM_CHAT_ID']!)
];
final slackChannelsSenders = [
SlackChannelSender(
applicationToken: dotEnv['SLACK_APPLICATION_ID']!,
channelName: dotEnv['SLACK_CHANNEL_NAME']!)
];
/// Send on multiple channels (telegram, slack, and custom)
final logger = Logger(
slackChannelsSenders: slackChannelsSenders,
telegramChannelsSenders: telegramChannelsSenders);
/// Send to Slack only
Logger.sendOnSlack(slackChannelsSenders);
/// Send to Telegram only
Logger.sendOnTelegram(telegramChannelsSenders);
final telegramMessage = TelegramLoggMessage()
..addNormalText('Hello mans.\n')
..addBoldText("Here is a litle logger build by")
..addMention('Ofceab Studio');
final slackMessage = SlackLoggMessage()
..addNormalText('Hello mans.\n')
..addBoldText("Here is a litle logger build by")
..addMention('Ofceab Studio');
final responses = await logger.logs(
slackLoggMessage: slackMessage, telegramLoggMessage: telegramMessage);
responses.forEach((log) {
if (log.isLeft()) {
print(log.fold((l) => l, (r) => null)!.error);
}
});
}
```
## Issues
Feel you free to open issue [here](https://github.com/Ofceab-Studio/loggme/issues)