rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.77k stars 1.22k forks source link

Getting a SL4J error on a blank project using this library #769

Closed ityulkanov closed 4 years ago

ityulkanov commented 4 years ago

I've tried to create a blank project with only your library, but it is breaking with an error:

SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.

Creating with springboot working just fine - it is starting without any errors. Is there a specific extra import I should add to build.gradle file to make it work?

My gradle file looks like this:

plugins {
    id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile group: 'org.telegram', name: 'telegrambots', version: '4.9'
}
rubenlagus commented 4 years ago

@ityulkanov please check http://www.slf4j.org/codes.html#noProviders, not an API issue

omkar-tenkale commented 1 year ago

Fixed it by adding slf4j dependency

implementation("org.telegram:telegrambots:6.3.0")
implementation("org.slf4j:slf4j-simple:2.0.5")