GithubHelp home page GithubHelp logo

hnjm / log4telegram Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dseller/log4telegram

0.0 2.0 0.0 10 KB

Log4net appender that allows you to send log messages using Telegram

License: MIT License

C# 100.00%

log4telegram's Introduction

Log4Telegram

Log4net appender that allows you to send log messages using Telegram

What does it do?

Quite simple: it takes your logging events, and forwards them to the Telegram Bot API.

How do I use it?

  1. First of all, you need to create a Telegram Bot account. You can follow this guide to do it.
  2. Install the NuGet package (or compile from source if you'd like).
  3. Configure the appender. It behaves like a regular appender in the way that you can use a layout for it. Aside from that, it requires two additional parameters: token - The token that identifies your Telegram Bot recipient - The ID of the recipient, this can be a regular account or a group
  4. Just use Log4net like you normally would. You can check out the Example project in the source code if you need to.

Will you continue development on this?

Probably not. I made this because I needed it myself and I wanted to share it with you. It's not exactly rocket science so you are free to fork it, or send pull requests, or whatever. Maybe if there's a big enough demand, I might work on it more.

Important notes

  • Telegram Bots can not send messages 'out of the blue' so to speak. You, as the recipient, need to initiate a conversation with your bot before it can send messages to your. You can also add the bot to a group conversation, and this will also enable it to send messages to the group.
  • Telegram's API allows the use of Markdown in their messages. You can use Markdown in your Log4net layout in order to use this in your log messages.

log4telegram's People

Contributors

dseller avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.